/* ไพ่ Ohana */

.ohana-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-bottom: 12px;
}

.ohana-count {
  color: var(--sub);
  font-size: 13px;
}

.ohana-card {
  width: 160px;
  height: 224px;
  border-radius: 16px;
  background: #f5f2ea;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  font-weight: 800;
}

.ohana-card.red {
  color: #d3252f;
}

.ohana-card.empty {
  font-size: 52px;
  background: var(--card);
  box-shadow: none;
}

.ohana-rank {
  font-size: 56px;
  line-height: 1;
}

.ohana-suit {
  font-size: 40px;
  margin-top: 4px;
}

.ohana-rule {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  min-height: 46px;
  padding: 0 12px;
}

.ohana-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 24px;
}

.ohana-overlay.show {
  opacity: 1;
}

.ohana-overlay-card {
  width: min(72vw, 300px);
  aspect-ratio: 5 / 7;
  border-radius: 22px;
  background: #f5f2ea;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  transform: rotateY(90deg) scale(0.75);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ohana-overlay.show .ohana-overlay-card {
  transform: rotateY(0deg) scale(1);
}

.ohana-overlay-card.red {
  color: #d3252f;
}

.ohana-overlay-card .ohana-rank {
  font-size: 100px;
  line-height: 1;
}

.ohana-overlay-card .ohana-suit {
  font-size: 68px;
  margin-top: 10px;
}

.ohana-overlay-rule {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 0 16px;
  opacity: 0;
  transition: opacity 0.3s ease 0.3s;
}

.ohana-overlay.show .ohana-overlay-rule {
  opacity: 1;
}

.ohana-overlay-next-btn {
  background: #fff;
  color: #1a1a1a;
  border: none;
  padding: 16px 40px;
  border-radius: var(--radius-pill);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.ohana-overlay-hint {
  color: var(--sub);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s ease 0.35s;
}

.ohana-overlay.show .ohana-overlay-hint {
  opacity: 1;
}

.ohana-secondary-row {
  display: flex;
  gap: 16px;
}

.ohana-remaining-overlay {
  position: fixed;
  inset: 0;
  max-width: var(--app-max-width);
  margin: 0 auto;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding-top: var(--safe-top);
}

.ohana-remaining-overlay.show {
  opacity: 1;
}

.ohana-remaining-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.ohana-remaining-title {
  font-size: 17px;
  font-weight: 700;
}

.ohana-remaining-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px calc(var(--safe-bottom) + 20px);
}

.ohana-remaining-group {
  margin-bottom: 18px;
}

.ohana-remaining-suit-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--sub);
  margin-bottom: 8px;
}

.ohana-remaining-suit-label.red {
  color: #d3252f;
}

.ohana-remaining-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ohana-remaining-chip {
  min-width: 32px;
  text-align: center;
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
}

.ohana-remaining-chip.red {
  color: #d3252f;
}

.ohana-remaining-empty {
  color: var(--sub);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}
