:root {
  --theme-bg: #f5ecd7;
  --theme-bg-card: #fffef5;
  --theme-text: #3a3028;
  --theme-text-dim: #8a7d6b;
  --theme-primary: #f0a878;
  --theme-primary-light: #fcc8a0;
  --theme-primary-dark: #d4885e;
  --theme-primary-shadow: #b87048;
  --theme-accent: #7eb8d8;
  --theme-accent-light: #a8d4f0;
  --theme-accent-dark: #5a97b8;
  --theme-accent-shadow: #447a98;
  --theme-success: #8ccf8e;
  --theme-success-dark: #5ea862;
  --theme-success-shadow: #488a4c;
  --theme-danger: #e88a8a;
  --theme-danger-dark: #c45a5a;
  --theme-danger-shadow: #a04444;
  --theme-warning: #e8c570;
  --theme-warning-dark: #c4a450;
  --theme-border: #d4c8a8;
  --theme-border-dark: #b8a880;
  --theme-shadow: #c4b898;
  --theme-dot1: #e8d8c0;
  --theme-dot2: #e0d0b8;
  --font-pixel: 'Press Start 2P', 'DotGothic16', monospace;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-word: Georgia, 'Times New Roman', 'Noto Serif', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--theme-bg);
  background-image:
    radial-gradient(circle, var(--theme-dot1) 1px, transparent 1px),
    radial-gradient(circle, var(--theme-dot2) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px;
  background-position: 0 0, 12px 12px;
  color: var(--theme-text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  image-rendering: pixelated;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 30%),
    linear-gradient(0deg, rgba(200,180,150,0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

#app {
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  padding: 24px 16px 48px;
  position: relative;
  z-index: 1;
}

.view { display: block; }
.view.hidden { display: none !important; }

/* ======== DECORATIVE PIXEL ELEMENTS ======== */

.pixel-deco-top {
  text-align: center;
  margin-bottom: 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--theme-accent);
  letter-spacing: 2px;
  opacity: 0.6;
}

.pixel-divider {
  text-align: center;
  margin: 16px 0;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--theme-border-dark);
  letter-spacing: 4px;
  user-select: none;
}

.pixel-icon-book { display: inline-block; width: 32px; height: 32px; position: relative; }
.pixel-icon-book::after {
  content: '📖';
  font-size: 28px;
  position: absolute;
  top: 0; left: 0;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.15));
}

/* ======== MODAL ======== */

.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(40,30,20,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none !important; }
.modal-content {
  background: var(--theme-bg-card);
  border: 4px solid var(--theme-border-dark);
  box-shadow:
    6px 6px 0 var(--theme-shadow),
    inset 0 0 0 2px var(--theme-bg-card),
    inset 0 0 0 4px var(--theme-border);
  padding: 28px 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modal-pop 0.15s step-end;
}
@keyframes modal-pop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  cursor: pointer;
  font-size: 22px;
  color: var(--theme-text-dim);
  font-family: var(--font-pixel);
  background: var(--theme-bg);
  border: 2px solid var(--theme-border);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: all 0.05s step-end;
}
.modal-close:hover { color: #fff; background: var(--theme-danger); border-color: var(--theme-danger-dark); }

/* ======== BUTTONS ======== */

.pixel-btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--theme-primary);
  border: none;
  border-bottom: 5px solid var(--theme-primary-shadow);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  position: relative;
  transition: transform 0.05s step-end, border-bottom-width 0.05s step-end;
  image-rendering: pixelated;
  letter-spacing: 1px;
}
.pixel-btn::after {
  content: '';
  position: absolute;
  top: 3px; left: 4px; right: 4px; height: 2px;
  background: rgba(255,255,255,0.3);
  pointer-events: none;
}
.pixel-btn:hover { background: var(--theme-primary-dark); }
.pixel-btn:active { transform: translateY(2px); border-bottom-width: 3px; }
.pixel-btn:active::after { top: 2px; }

.pixel-btn.btn-sm { padding: 10px 18px; font-size: 14px; border-bottom-width: 4px; }
.pixel-btn.btn-sm::after { top: 2px; left: 3px; right: 3px; height: 2px; }
.pixel-btn.btn-sm:active { border-bottom-width: 2px; }

.pixel-btn.btn-accent { background: var(--theme-accent); border-color: var(--theme-accent-shadow); }
.pixel-btn.btn-accent:hover { background: var(--theme-accent-dark); }
.pixel-btn.btn-success { background: var(--theme-success); border-color: var(--theme-success-shadow); }
.pixel-btn.btn-success:hover { background: var(--theme-success-dark); }
.pixel-btn.btn-danger { background: var(--theme-danger); border-color: var(--theme-danger-shadow); }
.pixel-btn.btn-danger:hover { background: var(--theme-danger-dark); }
.pixel-btn.btn-block { display: block; width: 100%; }
.pixel-btn.btn-lg { padding: 18px 36px; font-size: 19px; border-bottom-width: 6px; }
.pixel-btn.btn-lg:active { border-bottom-width: 4px; }
.pixel-btn.btn-lg::after { top: 4px; left: 5px; right: 5px; height: 3px; }
.pixel-btn.btn-lg:active::after { top: 3px; }

/* ======== CARDS ======== */

.pixel-card {
  background: var(--theme-bg-card);
  border: 3px solid var(--theme-border-dark);
  box-shadow:
    5px 5px 0 var(--theme-shadow),
    inset 0 0 0 1px var(--theme-bg-card),
    inset 0 0 0 3px var(--theme-border);
  padding: 20px 18px;
  margin-bottom: 18px;
  image-rendering: pixelated;
  transition: box-shadow 0.1s step-end;
}

/* ======== INPUT ======== */

.pixel-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-word);
  font-size: 18px;
  border: 4px solid var(--theme-border-dark);
  background: var(--theme-bg-card);
  color: var(--theme-text);
  outline: none;
  box-shadow:
    inset 3px 3px 0 rgba(0,0,0,0.06),
    0 0 0 1px var(--theme-border);
  transition: border-color 0.1s step-end;
}
.pixel-input:focus { border-color: var(--theme-accent); box-shadow: inset 3px 3px 0 rgba(0,0,0,0.06), 0 0 0 1px var(--theme-accent); }
.pixel-input.input-sm { padding: 10px 14px; font-size: 15px; }
.pixel-input.correct { border-color: var(--theme-success); background: #e8f8e8; animation: flash-green 0.5s step-end; }
.pixel-input.wrong { border-color: var(--theme-danger); background: #fde8e8; animation: flash-red 0.5s step-end; }

@keyframes flash-green {
  0%, 100% { background: var(--theme-bg-card); }
  50% { background: #d4f0d4; }
}
@keyframes flash-red {
  0%, 100% { background: var(--theme-bg-card); }
  50% { background: #fdd4d4; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.shake { animation: shake 0.3s step-end; }

/* ======== LABELS ======== */

.pixel-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--theme-text);
  display: block;
  margin-bottom: 8px;
}

/* ======== WELCOME / TITLES ======== */

.welcome-text {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  line-height: 2;
  color: var(--theme-text);
}

.title-text {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--theme-primary-dark);
  text-shadow: 3px 3px 0 var(--theme-shadow);
  letter-spacing: 2px;
}

.subtitle-text {
  font-family: var(--font-pixel);
  font-size: 10px;
  text-align: center;
  color: var(--theme-text-dim);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

/* ======== DASHBOARD STATS ======== */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--theme-bg-card);
  border: 3px solid var(--theme-border-dark);
  box-shadow: 4px 4px 0 var(--theme-shadow);
  padding: 18px 14px 14px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.06s step-end, box-shadow 0.06s step-end;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 6px; right: 6px; height: 3px;
  background: var(--theme-border);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 4px 7px 0 var(--theme-shadow); }
.stat-card:active { transform: translateY(0); box-shadow: 4px 2px 0 var(--theme-shadow); }

.stat-card .stat-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
  image-rendering: pixelated;
}
.stat-card .stat-num {
  font-family: var(--font-pixel);
  font-size: 28px;
  color: var(--theme-accent-dark);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.06);
}
.stat-card .stat-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--theme-text-dim);
  margin-top: 6px;
}

.stat-card.card-new .stat-num { color: var(--theme-primary-dark); }
.stat-card.card-new .stat-icon, .stat-card.card-new::after { background: none; }
.stat-card.card-review .stat-num { color: var(--theme-warning-dark); }
.stat-card.card-done .stat-num { color: var(--theme-success-dark); }
.stat-card.card-mastered .stat-num { color: #6bb06e; }

/* ======== PROGRESS BAR ======== */

.progress-bar-wrap {
  background: repeating-linear-gradient(
    90deg,
    #e8d8c0 0px,
    #e8d8c0 4px,
    #e0ccb0 4px,
    #e0ccb0 8px
  );
  border: 3px solid var(--theme-border-dark);
  height: 28px;
  margin-bottom: 8px;
  position: relative;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.06);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--theme-accent-light) 0px,
    var(--theme-accent-light) 6px,
    var(--theme-accent) 6px,
    var(--theme-accent) 8px,
    var(--theme-accent-dark) 8px,
    var(--theme-accent-dark) 10px
  );
  transition: width 0.4s step-end;
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; height: 3px;
  background: rgba(255,255,255,0.25);
}
.progress-text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--theme-text);
}

/* ======== LEARNING CONTAINER ======== */

.learn-container, .review-container, .dictation-container {
  text-align: center;
  position: relative;
}

.learn-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
}
.learn-input-row .pixel-input { flex: 1; }

.learn-progress-bar-wrap {
  background: repeating-linear-gradient(90deg, #e8d8c0 0px, #e8d8c0 4px, #e0ccb0 4px, #e0ccb0 8px);
  border: 3px solid var(--theme-border-dark);
  height: 20px;
  margin: 0 auto 16px;
  max-width: 460px;
  position: relative;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.06);
  overflow: hidden;
}
.learn-progress-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg,
    var(--theme-success-light, #a8e0b0) 0px,
    var(--theme-success-light, #a8e0b0) 6px,
    var(--theme-success) 6px,
    var(--theme-success) 8px,
    var(--theme-success-dark) 8px,
    var(--theme-success-dark) 10px
  );
  transition: width 0.3s step-end;
  position: relative;
}
.learn-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px; right: 2px; height: 2px;
  background: rgba(255,255,255,0.3);
}

.progress-info {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--theme-text-dim);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.word-box {
  background: var(--theme-bg-card);
  border: 4px solid var(--theme-border-dark);
  box-shadow:
    5px 5px 0 var(--theme-shadow),
    inset 0 0 0 2px var(--theme-bg-card),
    inset 0 0 0 4px var(--theme-border);
  padding: 28px 20px 20px;
  margin: 0 auto 20px;
  max-width: 460px;
  position: relative;
  word-break: break-word;
}
.word-box::before {
  content: '';
  position: absolute;
  top: 0; left: 8px; right: 8px; height: 4px;
  background: var(--theme-primary-light);
}

.word-display {
  font-family: var(--font-word);
  font-size: 36px;
  margin: 10px 0 10px;
  color: var(--theme-text);
  word-break: break-word;
  line-height: 1.5;
  font-weight: bold;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}
.word-display.incorrect { color: var(--theme-danger); animation: flash-red 0.5s step-end; }

.word-meaning {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--theme-text);
  margin-bottom: 8px;
  line-height: 1.5;
  font-weight: 700;
  padding: 8px 14px;
  background: #fef8e8;
  border: 2px dashed var(--theme-border);
  display: inline-block;
}

.speaker-icon {
  display: inline-block;
  font-size: 44px;
  cursor: pointer;
  margin: 10px 0 18px;
  user-select: none;
  transition: transform 0.1s step-end, filter 0.1s step-end;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.1));
}
.speaker-icon:hover { transform: scale(1.08); }
.speaker-icon:active { transform: scale(1.15); }
.speaker-icon.playing { animation: speaker-pulse 0.4s step-end infinite; }
@keyframes speaker-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ======== HINT KEYS ======== */

.hint-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.hint-key {
  display: inline-block;
  background: var(--theme-bg);
  border: 2px solid var(--theme-border-dark);
  padding: 6px 14px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--theme-text-dim);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.correct-answer {
  font-family: var(--font-word);
  font-size: 24px;
  color: var(--theme-danger);
  margin: 12px 0;
  font-weight: bold;
}

/* ======== WORD LIST ======== */

.word-list {
  max-height: 60vh;
  overflow-y: auto;
}
.word-list::before {
  content: '';
  display: block;
  height: 4px;
  background: repeating-linear-gradient(
    90deg, var(--theme-border) 0px, var(--theme-border) 4px, transparent 4px, transparent 8px
  );
  margin-bottom: 4px;
}
.word-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 2px dotted var(--theme-border);
  font-size: 15px;
  transition: background 0.05s step-end;
}
.word-list-item:hover { background: #fefcf0; }
.word-list-item .wl-name {
  font-family: var(--font-word);
  font-size: 16px;
  font-weight: bold;
}
.word-list-item .wl-trans {
  font-size: 13px;
  color: var(--theme-text-dim);
  text-align: right;
  max-width: 60%;
}
.word-list-item .wl-level {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--theme-accent-dark);
  margin-top: 2px;
}

/* ======== SETUP PAGE ======== */

.setup-card {
  max-width: 460px;
  margin: 30px auto 0;
}
.setup-card .pixel-input { margin-bottom: 16px; }
.setup-card .pixel-btn { margin-top: 12px; }
.setup-card .range-info {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--theme-text-dim);
  margin: -8px 0 14px;
  padding-left: 2px;
}

.setup-hero {
  text-align: center;
  margin-bottom: 24px;
  font-size: 48px;
  filter: drop-shadow(3px 3px 0 var(--theme-shadow));
}

/* ======== COMPLETE / MODAL ======== */

.complete-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 16px;
  animation: complete-bounce 0.6s step-end;
}
@keyframes complete-bounce {
  0% { transform: scale(0.3); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.complete-text {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  line-height: 2;
  margin-bottom: 20px;
}
.complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.stats-summary-item {
  background: var(--theme-bg);
  border: 2px solid var(--theme-border);
  padding: 12px;
  text-align: center;
}
.stats-summary-item .ss-num {
  font-family: var(--font-pixel);
  font-size: 20px;
  color: var(--theme-accent-dark);
}
.stats-summary-item .ss-label {
  font-size: 12px;
  color: var(--theme-text-dim);
  margin-top: 4px;
}

/* ======== OLD MODE INDICATORS (deprecated in HTML, keep for safety) ======== */

#review-view .mode-indicator, #learn-view .mode-indicator, #dictation-view .mode-indicator {
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 6px 14px;
  display: inline-block;
  margin-bottom: 12px;
}
#learn-view .mode-indicator { background: #e8f4e8; color: var(--theme-success-dark); border: 2px solid var(--theme-success); }
#review-view .mode-indicator { background: #fdf0e0; color: var(--theme-warning); border: 2px solid var(--theme-warning); }
#dictation-view .mode-indicator { background: #e8ecf8; color: var(--theme-accent-dark); border: 2px solid var(--theme-accent); }

/* ======== TOP BAR ======== */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--theme-border);
  position: relative;
}
.top-bar::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; width: 100%; height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--theme-border) 0px, var(--theme-border) 6px,
    transparent 6px, transparent 12px
  );
}
.top-bar .back-btn {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--theme-text-dim);
  background: var(--theme-bg);
  border: 2px solid var(--theme-border);
  padding: 4px 14px;
  box-shadow: 2px 2px 0 var(--theme-shadow);
  transition: all 0.05s step-end;
}
.top-bar .back-btn:hover { color: var(--theme-text); background: #fff; }
.top-bar .back-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--theme-shadow); }

.top-bar .top-title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--theme-text);
  letter-spacing: 1px;
}

/* ======== MISC ======== */

.setup-form-group { margin-bottom: 16px; }

/* ======== TOAST / ERROR OVERLAY ======== */

#error-overlay {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--theme-danger);
  color: #fff;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  border: 3px solid var(--theme-danger-shadow);
  box-shadow: 5px 5px 0 var(--theme-danger-shadow);
  max-width: 90%;
  text-align: center;
  cursor: pointer;
  animation: error-slide 0.15s step-end;
}
@keyframes error-slide {
  0% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ======== RESPONSIVE ======== */

@media (max-width: 480px) {
  .stats-grid { gap: 10px; }
  .word-display { font-size: 28px; }
  .pixel-btn.btn-lg { padding: 14px 28px; font-size: 16px; }
  .title-text { font-size: 18px; }
  .pixel-input { font-size: 16px; }
  .word-box { padding: 20px 14px 14px; }
  .word-meaning { font-size: 16px; }
}

/* ======== VERSION BADGE ======== */

.version-badge {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b0a090;
  z-index: 999;
  pointer-events: none;
  opacity: 0.6;
  background: rgba(255,255,255,0.4);
  padding: 3px 6px;
  border: 1px solid rgba(0,0,0,0.05);
}

/* ======== THEME SWATCH GRID ======== */

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border: 3px solid var(--theme-border);
  background: var(--theme-bg-card);
  cursor: pointer;
  transition: all 0.05s step-end;
  font-family: var(--font-body);
}
.theme-swatch:hover { border-color: var(--theme-accent); transform: translateY(-2px); }
.theme-swatch.theme-active {
  border-color: var(--theme-primary-dark);
  box-shadow: 0 0 0 2px var(--theme-primary-light);
  background: var(--theme-primary-light);
}
.theme-swatch-icon { font-size: 24px; }
.theme-swatch-dots { display: flex; gap: 4px; }
.theme-swatch-dots i {
  display: block; width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.1);
}
.theme-swatch-name {
  font-size: 12px; font-weight: 700;
  color: var(--theme-text);
}

/* ======== THEME SCENE DECORATIONS ======== */

.theme-scene {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}

.scene-item {
  position: absolute;
  font-size: 20px;
  opacity: 0.5;
  animation: scene-drift 8s ease-in-out infinite;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.08));
}
.scene-item:nth-child(odd) { animation-duration: 10s; animation-delay: -3s; }
.scene-item:nth-child(3n) { animation-duration: 12s; animation-delay: -5s; }

@keyframes scene-drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(2deg); }
  50% { transform: translateY(4px) rotate(-2deg); }
  75% { transform: translateY(-4px) rotate(1deg); }
}

.scene-item.static { animation: none; }

