/* ============================================
   JLPT ANSWER KEY PAGES — download & wait UI
   ============================================ */

/* ── WAIT / COUNTDOWN PAGE ── */
.wait-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: flex;
  justify-content: center;
}
.wait-box {
  text-align: center;
}
.wait-circle {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  border: 4px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-family: 'Shippori Mincho', serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--red);
}
.wait-msg {
  font-size: 0.95rem;
  color: var(--ink);
}
.wait-msg strong { color: var(--red); }
.wait-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
}
.wait-ad-slot {
  margin-top: 2rem;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ── DOWNLOAD CARDS ── */
.dl-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.dl-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 12px var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
}
.dl-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}
.dl-body { flex: 1; }
.dl-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.95rem;
  font-weight: 600;
}
.dl-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.dl-btn {
  flex-shrink: 0;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.dl-btn:hover { background: #96291d; }

/* ── DOWNLOAD MODAL ── */
.dl-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,18,8,0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.dl-modal-overlay.active { display: flex; }
.dl-modal {
  background: var(--paper);
  border-radius: 8px;
  max-width: 400px;
  width: 100%;
  padding: 1.6rem 1.4rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.dl-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.3rem;
}
.dl-modal-close:hover { color: var(--red); }
.dl-modal h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  padding-right: 1.2rem;
}
.dl-modal-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.dl-code-display {
  display: none;
  background: var(--paper2);
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}
.dl-code-display.active { display: block; }
.dl-code-display span {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.2em;
  margin-left: 0.4rem;
}
.dl-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.dl-input-row input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Noto Sans JP', sans-serif;
  background: white;
  color: var(--ink);
}
.dl-input-row input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.dl-get-code-btn {
  flex-shrink: 0;
  background: var(--gold);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.dl-get-code-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dl-timer {
  font-size: 0.78rem;
  color: var(--gold);
  min-height: 1.1rem;
  margin-bottom: 0.4rem;
}
.dl-error {
  font-size: 0.78rem;
  color: var(--red);
  min-height: 1.1rem;
  margin-bottom: 0.6rem;
}
.dl-confirm-btn {
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.dl-confirm-btn:hover { background: #12522d; }
