/* ==========================================================
   neur0doku-quests.css
   Layout for the quests screen only. Colors come from
   neur0doku-theme.css — nothing here should hardcode a color
   or reach for a site --token. Self-contained: this page loads
   ONLY neur0doku-theme.css alongside this file, so the .nd-tabs/
   .nd-tab-btn rules here are a standalone pill-toggle, not a
   dependency on neur0doku-home.css's modal-tab styling.
   ========================================================== */

.neur0doku-quests {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ---------- top bar: back + thread balance ---------- */
.nd-quests-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.nd-icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: var(--nd-surface);
  border: 1px solid var(--nd-border);
  box-shadow: 0 3px 8px var(--nd-shadow);
  cursor: pointer;
  text-decoration: none;
  color: var(--nd-text);
}
.nd-icon-btn:hover { transform: translateY(-1px); text-decoration: none; }
.nd-icon-btn:focus-visible { outline: 2px solid var(--nd-focus); outline-offset: 2px; }
.nd-icon-btn img { width: 60%; height: 60%; object-fit: contain; pointer-events: none; }

.nd-quests-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--nd-surface);
  border: 1px solid var(--nd-border);
  box-shadow: 0 3px 8px var(--nd-shadow);
  font-weight: 700;
  color: var(--nd-text);
}
.nd-thread-icon { font-size: 1.1rem; }

/* ---------- period tabs ---------- */
.nd-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.nd-tab-btn {
  flex: 1;
  border: 1px solid var(--nd-button-border);
  background: var(--nd-surface);
  color: var(--nd-text-soft);
  font-family: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nd-tab-btn.is-active {
  background: var(--nd-button-bg);
  color: var(--nd-button-ink);
  border-color: var(--nd-button-border);
}
.nd-tab-btn:focus-visible { outline: 2px solid var(--nd-focus); outline-offset: 2px; }

/* ---------- reward track ---------- */
.nd-reward-track {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  padding: 0 0.3rem;
}

.nd-reward-start {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--nd-surface);
  border: 1px solid var(--nd-border);
  box-shadow: 0 3px 8px var(--nd-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nd-reward-line {
  position: relative;
  flex: 1;
  height: 4px;
  background: var(--nd-off);
  border-radius: 999px;
  margin: 0 0.5rem;
}

.nd-reward-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--nd-accent);
  border-radius: 999px;
}

.nd-reward-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.05rem;
  line-height: 1;
}

/* ---------- quest list ---------- */
.nd-quest-panel[hidden] { display: none; }

.nd-quest-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nd-quest-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  background: var(--nd-button-bg);
  border: 1px solid var(--nd-button-border);
  color: var(--nd-button-ink);
}

/* Small dot marking a quest as ready to claim — placeholder for
   whatever the real completion-check ends up looking like. */
.nd-quest-row.is-claimable::after {
  content: '';
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #e0645a;
  border: 2px solid var(--nd-surface);
}

.nd-quest-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.nd-quest-reward {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.nd-quest-amount {
  min-width: 1.3rem;
  text-align: right;
}

/* ---------- claim all ---------- */
.nd-claim-all-btn {
  display: block;
  margin-left: auto;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--nd-button-border);
  background: var(--nd-surface);
  color: var(--nd-text);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.nd-claim-all-btn:hover { background: var(--nd-bg); }
.nd-claim-all-btn:focus-visible { outline: 2px solid var(--nd-focus); outline-offset: 2px; }

.nd-quests-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--nd-text-soft);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .nd-icon-btn, .nd-tab-btn, .nd-claim-all-btn {
    transition: none;
  }
}