/* ============================================
   Clean Starts Here — Campaign Site
   Complete Redesign: Paper-textured, Minimal, Premium
   ============================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

/* --- Design Tokens --- */
:root {
  --bg: #fafaf8;
  --bg-warm: #f5f2ed;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4540;
  --text-muted: #8a847e;
  --green: #2d6a4f;
  --green-light: #40916c;
  --green-pale: #d8f3dc;
  --green-glow: rgba(45, 106, 79, 0.15);
  --border: rgba(26, 26, 26, 0.08);
  --font: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Logo / Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: normal;
  transition: opacity 0.4s var(--ease-smooth);
}

.logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  user-select: none;
}

.logo span {
  color: var(--green);
}

.header-progress {
  width: 60px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.header-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.6s var(--ease-out);
}

/* ============================================
   Section 1: Intro / Hero
   ============================================ */
.section-intro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 40px 140px;
  position: relative;
}

.intro-text {
  text-align: center;
  max-width: 800px;
}

.intro-text h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  word-break: keep-all;
}

.intro-text h1 .accent {
  color: var(--green);
}

.intro-sub {
  margin-top: 32px;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: -0.01em;
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.scroll-hint-line {
  width: 1px;
  height: 40px;
  background: var(--text-muted);
  opacity: 0.4;
  animation: scrollPulse 2s var(--ease-smooth) infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(0.5); opacity: 0.15; }
}

/* ============================================
   Section 2: Trash Cleanup Interaction
   ============================================ */
.section-cleanup {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px 80px;
  overflow: hidden;
}

.cleanup-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  min-height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden-message {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  word-break: keep-all;
  max-width: 700px;
  z-index: 1;
  user-select: none;
}

.hidden-message .green {
  color: var(--green);
}

/* Cleanup hint overlay */
.cleanup-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  padding: 16px 28px;
  border-radius: 100px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s var(--ease-out);
}

.cleanup-hint.hidden {
  opacity: 0;
}

.cleanup-hint-icon {
  width: 24px;
  height: 24px;
  color: var(--green);
  animation: hintDrag 1.5s infinite ease-in-out;
}

.cleanup-hint span {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.01em;
}

@keyframes hintDrag {
  0%, 100% { transform: translateX(-12px) rotate(-10deg); }
  50% { transform: translateX(12px) rotate(10deg); }
}

/* Trash objects */
.trash-item {
  position: absolute;
  cursor: grab;
  z-index: 10;
  transition: filter 0.2s, box-shadow 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  will-change: transform;
}

.trash-item:hover {
  filter: brightness(0.92) drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}

.trash-item.dragging {
  cursor: grabbing;
  z-index: 100;
  filter: brightness(0.88) drop-shadow(0 6px 20px rgba(0,0,0,0.18));
}

.trash-item svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.cleanup-flex-container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  z-index: 10;
  position: relative;
}

/* Cleanup counter */
.cleanup-counter {
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
  min-height: 20px;
}

.cleanup-counter strong {
  color: var(--green);
  font-weight: 600;
}

/* Completion message */
.cleanup-complete {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}
.complete-v-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cleanup-complete span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cleanup-complete.visible {
  opacity: 1;
}
.cleanup-complete.visible .complete-v-mark {
  opacity: 1;
  transform: scale(1);
}

.cleanup-reset {
  margin-top: 24px;
  padding: 12px 28px;
  border-radius: 100px;
  border: 1px solid rgba(45, 106, 79, 0.2);
  background: #fff;
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.4s var(--ease-out);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.08);
  animation: pulseReset 2s infinite;
}
@keyframes pulseReset {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(45, 106, 79, 0); }
}
.cleanup-reset.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.cleanup-reset:hover {
  background: var(--green);
  color: #fff;
}

/* Reward illustration */
.cleanup-reward {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.6);
  width: 100vw;
  max-width: 1400px;
  height: auto;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}
.cleanup-reward svg {
  width: 100%;
  height: 100%;
}


/* ============================================
   Section 3: 오늘의 환경 퀘스트
   ============================================ */
.section-actions {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
  position: relative;
}

.actions-header {
  text-align: center;
  margin-bottom: 56px;
}

.actions-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.4;
  word-break: keep-all;
}

.actions-header p {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Quest wrapper */
.quest-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: 800px;
}

@media (max-width: 600px) {
  .quest-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }
}

/* Progress ring */
.quest-progress {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}

.progress-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.6s var(--ease-out);
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Quest items */
.quest-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 320px;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 64px;
  box-sizing: border-box;
}

.quest-item:hover {
  border-color: rgba(45, 106, 79, 0.25);
  background: rgba(255, 255, 255, 0.7);
  transform: translateX(4px);
}

.quest-item.checked {
  border-color: var(--green);
  background: rgba(45, 106, 79, 0.04);
}

.quest-check-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  color: transparent;
  background: rgba(255, 255, 255, 0.6);
}

.quest-check-icon svg {
  width: 16px;
  height: 16px;
}

.quest-item.checked .quest-check-icon {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.quest-item.checked .quest-refresh-btn {
  pointer-events: none;
  opacity: 0.3;
}

/* Quest label + badge row */
.quest-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.quest-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-item.checked .quest-label {
  color: var(--green);
}

/* Difficulty badge */
.quest-badge-diff {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}

.quest-badge-diff.easy {
  background: rgba(45, 106, 79, 0.08);
  color: var(--green);
  border: 1px solid rgba(45, 106, 79, 0.15);
}

.quest-badge-diff.medium {
  background: rgba(180, 140, 40, 0.08);
  color: #8a6d1b;
  border: 1px solid rgba(180, 140, 40, 0.15);
}

.quest-badge-diff.hard {
  background: rgba(180, 60, 50, 0.08);
  color: #a63c2e;
  border: 1px solid rgba(180, 60, 50, 0.12);
}

/* Completion celebration */
.quest-complete {
  margin-top: 48px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.7s var(--ease-out);
  pointer-events: none;
}

.quest-complete.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quest-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.quest-badge svg {
  width: 100%;
  height: 100%;
}

.quest-complete-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.01em;
}

.quest-complete-sub {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 450;
}

@keyframes checkPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.quest-item.just-checked .quest-check-icon {
  animation: checkPop 0.4s var(--ease-out);
}

/* Confetti particles */
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9998;
}

/* ============================================
   Section 4: Quiz Game
   ============================================ */
.section-quiz {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
}

.quiz-header {
  text-align: center;
  margin-bottom: 56px;
}

.quiz-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.quiz-header p {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.quiz-container {
  width: 100%;
  max-width: 580px;
  position: relative;
}

/* Progress bar */
.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 40px;
}

.quiz-progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.5s var(--ease-out);
}

.quiz-progress-dot.active {
  background: var(--green);
}

.quiz-progress-dot.done {
  background: var(--green);
}

/* Quiz card (single question) */
.quiz-card {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.quiz-card.active {
  display: flex;
  animation: quizFadeIn 0.5s var(--ease-out);
}

@keyframes quizFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-number {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.quiz-question {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.quiz-option {
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  text-align: left;
  font-family: var(--font);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

.quiz-option:hover {
  border-color: rgba(45, 106, 79, 0.3);
  background: rgba(255, 255, 255, 0.8);
}

.quiz-option.correct {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green);
  font-weight: 500;
}

.quiz-option.wrong {
  border-color: #d4453a;
  background: rgba(212, 69, 58, 0.06);
  color: #d4453a;
}

.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.quiz-explanation {
  font-size: 0.93rem;
  color: var(--text-secondary);
  font-weight: 450;
  line-height: 1.7;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  border-left: 3px solid var(--green);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease-out);
}

.quiz-explanation.visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-next-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 16px rgba(45, 106, 79, 0.2);
}
.quiz-next-btn:hover {
  transform: translateY(-2px);
  background: #235c43;
  box-shadow: 0 12px 20px rgba(45, 106, 79, 0.3);
}
.quiz-next-btn:active {
  transform: translateY(1px);
}

/* Quiz result */
.quiz-result {
  display: none;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.quiz-result.active {
  display: flex;
  animation: quizFadeIn 0.6s var(--ease-out);
}

.quiz-result-score {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.04em;
  line-height: 1;
}

.quiz-result-label {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.quiz-result-message {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 8px;
}

.quiz-restart {
  margin-top: 24px;
  padding: 14px 36px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.quiz-restart:hover {
  background: var(--green-light);
  transform: translateY(-1px);
}

/* ============================================
   Section 4.5: Education
   ============================================ */
.section-education {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
}

.edu-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.edu-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: -0.02em;
}

.edu-content {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.edu-content p {
  margin-bottom: 12px;
}

.edu-list {
  margin: 24px 0;
  padding-left: 24px;
}

.edu-list li {
  margin-bottom: 12px;
  list-style-type: disc;
  color: var(--text-secondary);
}

.edu-list li::marker {
  color: var(--green);
}

.edu-highlight {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green);
  text-align: center;
  margin: 40px 0 20px;
  padding: 20px;
  background: rgba(45, 106, 79, 0.05);
  border-radius: 12px;
  word-break: keep-all;
}

.edu-sources {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.edu-sources p {
  margin-bottom: 8px;
  font-weight: 500;
}

.edu-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   Section 4.6: Stories
   ============================================ */
.section-story {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
}

.story-header {
  text-align: center;
  margin-bottom: 48px;
}

.story-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--green);
}

.story-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 600px;
}

.story-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card.locked {
  background: rgba(250, 250, 248, 0.8);
  border-color: rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
}

.story-locked-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.3s;
}

.story-card.unlocked .story-locked-content {
  display: none;
}

.lock-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

.lock-text {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 1rem;
}

.lock-req {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.story-unlocked-content {
  display: none;
  opacity: 0;
  transform: scale(0.95);
  transform-origin: center;
}

.story-card.unlocked .story-unlocked-content {
  display: block;
  animation: storyFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes storyFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.story-card.unlocked {
  background: #fff;
  border-color: rgba(45, 106, 79, 0.2);
  box-shadow: 0 8px 24px rgba(45, 106, 79, 0.05);
}

.story-unlocked-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.story-icon {
  font-size: 1.2rem;
}

.story-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.story-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   Section 5: Closing
   ============================================ */
.section-closing {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px 60px;
  text-align: center;
}

.closing-text {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.03em;
  max-width: 700px;
  word-break: keep-all;
}

.closing-text .green {
  color: var(--green);
}

.closing-sub {
  margin-top: 24px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.closing-credit {
  margin-top: 64px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ============================================
   Section Divider
   ============================================ */
/* Section dividers — visible connecting line with dot */
.section-divider {
  width: 3px;
  height: 80px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--green) 20%,
    var(--green) 80%,
    transparent 100%
  );
  opacity: 0.25;
  border-radius: 2px;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.6;
  animation: dividerPulse 2.5s var(--ease-smooth) infinite;
}

@keyframes dividerPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.6); opacity: 0.2; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .site-header {
    padding: 20px 24px;
  }

  .section-intro,
  .section-cleanup,
  .section-actions,
  .section-quiz,
  .section-closing {
    padding-left: 24px;
    padding-right: 24px;
  }

  .cleanup-container {
    min-height: 420px;
  }

  .quest-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .intro-text h1 {
    font-size: 1.8rem;
  }

  .hidden-message {
    font-size: 1.2rem;
  }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: 48px 40px 36px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ============================================
   Utility
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header right container */
.header-right {
  display: flex;
  align-items: center;
  position: relative;
  height: 24px;
}
.header-progress {
  width: 120px;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 0.4s var(--ease-out);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.header-progress.hidden {
  opacity: 0;
  pointer-events: none;
}
.header-progress-bar {
  height: 100%;
  background: var(--text-primary);
  width: 0%;
  transition: width 0.3s var(--ease-out);
}

/* Mini Game UI (Header Integrated) */
.header-game-ui {
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.header-game-ui.hidden {
  opacity: 0;
  transform: translateY(-15px);
  pointer-events: none;
}

.store-icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.store-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.3);
}
.store-icon-btn.hidden {
  display: none;
}

.clean-point-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: default;
  position: relative;
}
.clean-point-wrapper::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #333;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.clean-point-wrapper:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.leaf-icon {
  display: inline-block;
}
.point-number {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

@keyframes popSpring {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); color: var(--green); }
  100% { transform: scale(1); }
}
.pop-anim {
  animation: popSpring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast-msg {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  animation: toastFadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.toast-msg.hiding {
  animation: toastFadeOut 0.4s forwards;
}
.toast-msg .accent { color: var(--green); }
.toast-sub { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastFadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}
.store-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.store-btn:hover { background: rgba(0, 0, 0, 0.05); }

/* Store Modal */
.store-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.store-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.store-modal {
  background: #fff;
  border-radius: 24px;
  padding: 32px 32px 16px 32px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}
.store-modal-overlay.active .store-modal {
  transform: scale(1);
  opacity: 1;
}
.store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.store-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn:hover { background: rgba(0,0,0,0.05); }

.store-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 16px;
  /* Hide scrollbar for a cleaner look */
  scrollbar-width: none;
}
.store-items::-webkit-scrollbar {
  display: none;
}
.store-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.2s;
  opacity: 0;
  transform: translateY(10px);
  animation: storeItemFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.store-item.no-anim {
  animation: none !important;
  opacity: 1;
  transform: none;
}
@keyframes storeItemFadeIn {
  to { opacity: 1; transform: translateY(0); }
}
.store-item.purchased {
  opacity: 0.6;
  background: rgba(0,0,0,0.02);
}
.store-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.store-item-title {
  font-weight: 600;
  font-size: 14px;
}
.store-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
}
.store-item-buy {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.store-item-buy:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}
.store-item-buy.owned {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  cursor: default;
}

/* Tool Dock */
.tool-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 12px;
  border-radius: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.tool-dock.active {
  opacity: 1;
  pointer-events: auto;
}
.tool-btn {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-btn:hover {
  transform: scale(1.1);
}
.tool-btn.selected {
  background: var(--green);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

/* Global Trash & Blackhole */
.global-trash {
  position: absolute;
  z-index: 50;
  cursor: pointer;
  transition: transform 0.3s;
}
.global-trash:hover {
  transform: scale(1.1) rotate(5deg);
}

.blackhole {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #000 30%, #333 70%, transparent 100%);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  z-index: 40;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

/* Quest Refresh */
.quest-refresh-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.quest-refresh-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-primary);
}
.quest-item.swap-out {
  animation: swapOut 0.3s var(--ease-out) forwards;
}
.quest-item.swap-in {
  animation: swapIn 0.3s var(--ease-out) forwards;
}

@keyframes swapOut {
  0% { transform: translateX(0); filter: blur(0); opacity: 1; }
  100% { transform: translateX(-30px); filter: blur(2px); opacity: 0; }
}
@keyframes swapIn {
  0% { transform: translateX(30px); filter: blur(2px); opacity: 0; }
  100% { transform: translateX(0); filter: blur(0); opacity: 1; }
}
