/* ===== Mosquito Hearing Test Plugin Styles ===== */

.mht-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  color: #1a1a1a;
}

/* ---- Intro ---- */
.mht-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #1a1a1a;
}
.mht-desc {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
  margin: 0 0 0.4rem;
}
.mht-caution {
  font-size: 0.8rem;
  color: #e55;
  margin: 0 0 1.5rem;
}

/* ---- Volume ---- */
.mht-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.8rem;
  font-size: 0.88rem;
  color: #555;
}
.mht-volume-row input[type=range] {
  flex: 1;
  accent-color: #3a7bd5;
  height: 4px;
}
#mht-volume-val {
  min-width: 36px;
  font-weight: 600;
  color: #3a7bd5;
}

/* ---- Grid ---- */
.mht-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 1.8rem;
}

/* ---- Card ---- */
.mht-card {
  background: #fff;
  border: 1.5px solid #e0e4ea;
  border-radius: 14px;
  padding: 1.1rem 0.9rem 0.9rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mht-card[data-state="yes"] {
  border-color: #27ae60;
  background: #f0faf4;
}
.mht-card[data-state="no"] {
  border-color: #c0c8d8;
  background: #f5f6f8;
}
.mht-hz {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.mht-age-badge {
  display: inline-block;
  font-size: 0.72rem;
  background: #eef2ff;
  color: #3a5fc8;
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 10px;
  font-weight: 600;
}

/* ---- Play button ---- */
.mht-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 7px 0;
  background: #3a7bd5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 10px;
}
.mht-play-btn:hover { background: #2a5bb5; }
.mht-play-btn.playing {
  background: #e55;
  animation: mht-pulse 0.9s infinite alternate;
}
@keyframes mht-pulse {
  from { opacity: 1; }
  to   { opacity: 0.75; }
}
.mht-icon { font-size: 0.75rem; }

/* ---- Answer buttons ---- */
.mht-answer-row {
  display: flex;
  gap: 6px;
}
.mht-answer {
  flex: 1;
  padding: 6px 2px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid #d0d5de;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #444;
}
.mht-answer:hover { border-color: #3a7bd5; color: #3a7bd5; }
.mht-answer.selected-yes {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}
.mht-answer.selected-no {
  background: #8896aa;
  border-color: #8896aa;
  color: #fff;
}
.mht-selected-label {
  font-size: 0.72rem;
  margin-top: 5px;
  min-height: 1em;
  color: #888;
}

/* ---- Action buttons ---- */
.mht-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
}
.mht-diagnose-btn {
  flex: 1;
  padding: 12px;
  background: #3a7bd5;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.mht-diagnose-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.mht-diagnose-btn:not(:disabled):hover { background: #2a5bb5; }

.mht-reset-btn {
  padding: 12px 20px;
  background: #fff;
  color: #555;
  border: 1.5px solid #d0d5de;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}
.mht-reset-btn:hover { border-color: #888; }

/* ---- Result ---- */
.mht-result {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
  border: 2px solid #3a7bd5;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  animation: mht-fadein 0.4s ease;
}
@keyframes mht-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mht-result-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.mht-result-label {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 0.3rem;
}
.mht-result-age {
  font-size: 2.6rem;
  font-weight: 800;
  color: #1a3a7a;
  margin-bottom: 0.7rem;
}
.mht-result-comment {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.7;
  margin: 0 0 1rem;
}
.mht-result-detail {
  font-size: 0.82rem;
  color: #666;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  line-height: 1.8;
  text-align: left;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .mht-grid { grid-template-columns: repeat(2, 1fr); }
  .mht-title { font-size: 1.3rem; }
}
