.ah-area {
  max-width: 520px;
}

.ah-score {
  margin-left: 8px;
  display: inline-block;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}
.mp-player .ah-score + .dot { margin-left: 8px; }

.ah-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 10px 0 14px;
}
.ah-pdot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--line);
  transition: background 120ms, border-color 120ms, transform 120ms;
}
.ah-pdot.current {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: scale(1.15);
}
.ah-pdot.correct {
  background: #2f7a3d;
  border-color: #2f7a3d;
}
.ah-pdot.wrong {
  background: #8a2a2a;
  border-color: #8a2a2a;
}

.ah-duel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin: 8px auto 14px;
  max-width: 360px;
}

.ah-card {
  position: relative;
  width: 100%;
  background: var(--panel2);
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 110px;
  transition: border-color 120ms, transform 120ms;
}
.ah-card:hover { border-color: var(--accent); }

.ah-card.ah-card-placeholder {
  background: linear-gradient(135deg, #ff61c7 0%, #b94a8f 100%);
  color: #fff;
}
.ah-card.ah-card-placeholder .ah-title { color: #fff; }
.ah-card.ah-card-placeholder .ah-mal { color: rgba(255,255,255,0.85); }

.ah-card-empty {
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--muted);
  min-height: 110px;
}

.ah-cover {
  width: 80px;
  height: auto;
  min-height: 110px;
  object-fit: cover;
  background: #1a1d24;
  flex: 0 0 80px;
  display: block;
}

.ah-meta {
  flex: 1 1 auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.ah-card-placeholder .ah-meta {
  padding: 14px;
  text-align: center;
}

.ah-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.25;
  word-break: break-word;
}

.ah-mal {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.ah-mal b {
  font-size: 18px;
  color: var(--accent);
}
.ah-mal .ah-q {
  color: #888;
  font-size: 20px;
}

.ah-vs {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 10px;
}

.ah-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto 8px;
}

.ah-btn {
  padding: 14px 8px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 120ms, transform 80ms, border-color 120ms;
}
.ah-btn:hover { border-color: var(--accent); background: #283040; }
.ah-btn:active { transform: translateY(1px); }

.ah-btn-up   { color: #6dd47e; }
.ah-btn-down { color: #ff8b8b; }

.ah-arrow {
  font-family: monospace;
  font-size: 18px;
  font-weight: 900;
}

.ah-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
  margin: 6px auto 0;
}

.ah-wait {
  margin: 14px auto 0;
  padding: 14px;
  background: var(--panel2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  max-width: 360px;
}

.ah-actions {
  margin-top: 14px;
  text-align: center;
}

.ah-review {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ah-rev-row {
  display: grid;
  grid-template-columns: 24px 1fr 28px 1fr 24px;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  padding: 4px 6px;
  background: var(--panel2);
  border-radius: 6px;
}
.ah-rev-n {
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.ah-rev-t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ah-rev-s {
  color: var(--accent);
  font-weight: 700;
  margin-left: 4px;
}
.ah-rev-vs {
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}
.ah-rev-tick {
  text-align: center;
  font-weight: 900;
  font-family: monospace;
}
.ah-rev-tick.ok  { color: #6dd47e; }
.ah-rev-tick.bad { color: #ff8b8b; }

@media (min-width: 520px) {
  .ah-duel { max-width: 460px; }
  .ah-cover { flex: 0 0 100px; width: 100px; }
}
