:root {
  --bg: #FAF7F2;
  --bg-lavender: #E8E0F0;
  --bg-lavender-deep: #C5B8D9;
  --text-primary: #1A1A2E;
  --text-secondary: #6B5F7E;
  --text-muted: #A99BBD;
  --card-bg: #FFFFFF;
  --card-shadow: rgba(100, 80, 140, 0.08);
  --accent: #7C5CBF;
  --accent-light: #9B7FD4;
  --accent-glow: rgba(124, 92, 191, 0.15);
  --accent-surface: #EDE7F6;
  --button-dark: #1A1A2E;
  --skip-bg: #F0ECF5;
  --skip-text: #7C5CBF;
  --reward-gold: #F5C542;
  --reward-warm: #FFF8E7;
  --rare-pink: #E891B9;
  --rare-surface: #FDF0F5;
  --rare-glow: rgba(232, 145, 185, 0.3);
  --success-green: #7BC67E;
  --radius: 24px;
  --radius-sm: 16px;
  --radius-full: 9999px;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hidden { display: none !important; }

/* Install banner */
.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  position: relative;
}
.install-banner-icon { font-size: 22px; flex-shrink: 0; }
.install-banner-body { flex: 1; min-width: 0; }
.install-banner-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.install-banner-sub {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}
.install-btn {
  background: white;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.install-btn:hover { opacity: 0.9; }
.install-dismiss {
  background: none;
  border: none;
  color: white;
  opacity: 0.6;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.install-dismiss:hover { opacity: 1; }

/* iOS tutorial */
.ios-tutorial {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(100,80,140,0.15);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1.5px solid var(--bg-lavender);
}
.ios-tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--bg-lavender);
}
.ios-tutorial-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.ios-tutorial-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 2px 4px;
}
.ios-tutorial-steps {
  padding: 12px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ios-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ios-step-body { flex: 1; min-width: 0; }
.ios-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.ios-step-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}
.ios-step-hint strong { color: var(--text-primary); }
.ios-step-arrow {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}
.ios-step-visual {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.ios-step-visual svg { width: 44px; height: 44px; }

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px;
}
.logo {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.badge {
  background: var(--accent-surface);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.3s;
}
.subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Input */
.input-hero { margin-bottom: 16px; }
.input-hero input {
  width: 100%;
  padding: 18px 22px;
  border: 2px solid var(--bg-lavender);
  border-radius: var(--radius);
  font-size: 16px;
  background: var(--card-bg);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  font-weight: 500;
  box-shadow: 0 2px 8px var(--card-shadow);
}
.input-hero input::placeholder { color: var(--text-muted); }
.input-hero input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 2px 8px var(--card-shadow), 0 0 0 4px var(--accent-glow);
}

.input-collapsed {
  padding: 10px 18px;
  background: var(--card-bg);
  border: 1.5px solid var(--bg-lavender);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px var(--card-shadow);
  transition: all 0.2s;
}
.input-collapsed:hover,
.input-collapsed:focus {
  border-color: var(--accent-light);
  color: var(--accent);
  outline: none;
}

/* Loading with breathing exercise */
.loading-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px 24px;
  box-shadow: 0 4px 20px var(--card-shadow);
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.breathing-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-lavender);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: breathe 4s ease-in-out infinite;
}
.breathing-inner {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: breatheInner 4s ease-in-out infinite;
}
.loading-text {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.loading-sub {
  font-size: 14px;
  color: var(--text-muted);
  transition: opacity 0.5s;
}

/* Streaming steps */
.streaming-steps {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 20px var(--card-shadow);
  margin-bottom: 16px;
}
.streaming-header {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 16px;
}
.streaming-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.streaming-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: stepFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.streaming-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.streaming-step-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.4;
  padding-top: 2px;
}
.streaming-step-text.typing::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: var(--accent);
}
.streaming-done-btn {
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  background: var(--button-dark);
  color: #fff;
  animation: stepFadeIn 0.3s ease;
}
.streaming-done-btn:hover {
  background: #2D2D4A;
  transform: translateY(-1px);
}

/* Task list */
.task-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.task-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.task-item.expanded { box-shadow: 0 4px 20px var(--card-shadow), 0 1px 3px rgba(0,0,0,0.04); }

.task-header {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}
.task-header:hover { background: rgba(124,92,191,0.03); }

.task-header-icon { font-size: 18px; flex-shrink: 0; }

.task-header-content { flex: 1; min-width: 0; }
.task-title {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.deadline-pill {
  background: var(--accent-surface);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.deadline-pill.overdue {
  background: #FDE8E8;
  color: #C53030;
}
.deadline-pill.soon {
  background: #FFF8E7;
  color: #92600E;
}
.add-deadline {
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.task-header:hover .add-deadline { opacity: 1; }

.task-progress-mini {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.task-expand-icon {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.task-item.expanded .task-expand-icon { transform: rotate(180deg); }

/* Expanded task body */
.task-body {
  display: none;
  padding: 0 20px 16px;
}
.task-item.expanded .task-body { display: block; }

.step-list { display: flex; flex-direction: column; gap: 6px; }

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
}
.step-item.done { text-decoration: line-through; opacity: 0.5; }
.step-item.current { color: var(--text-primary); font-weight: 500; }

.step-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-icon.done-icon { background: var(--accent); color: white; }
.step-icon.current-icon {
  background: var(--accent-surface);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 6px var(--accent-glow);
}
.step-icon.pending-icon { background: var(--bg-lavender); color: var(--text-muted); }

.step-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-left: 30px;
}
.step-actions .btn { padding: 10px 20px; font-size: 14px; }

/* Deadline input inline */
.deadline-input {
  border: 1.5px solid var(--bg-lavender);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--card-bg);
  outline: none;
  margin-top: 8px;
}
.deadline-input:focus { border-color: var(--accent-light); }

.actions { display: flex; gap: 12px; margin-top: 20px; }
.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-done {
  background: var(--button-dark);
  color: #fff;
}
.btn-done:hover {
  background: #2D2D4A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,26,46,0.2);
}
.btn-skip {
  background: var(--skip-bg);
  color: var(--skip-text);
}
.btn-skip:hover { background: #E5DFF0; }

/* Reward overlay */
.reward-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(250, 247, 242, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
  animation: rewardFadeIn 0.2s ease;
  cursor: pointer;
}
.reward-emoji {
  font-size: 64px;
  animation: rewardPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reward-text {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--accent);
  margin-top: 12px;
}
.reward-overlay.rare .reward-text { color: var(--rare-pink); }
.reward-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.reward-tap {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  opacity: 0.5;
}

/* Small reward: just a pulse on the card */
.card.reward-pulse {
  animation: colorPulse 0.4s ease;
}

/* Fallback card */
.fallback-card {
  background: var(--reward-warm);
  border: 1.5px solid #F0DFB8;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.fallback-msg {
  font-size: 16px;
  color: #92600E;
  line-height: 1.5;
  font-weight: 500;
}
.fallback-card input {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: 1.5px solid #E8D5A8;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-sans);
  background: white;
  color: var(--text-primary);
}
.fallback-card input:focus {
  outline: none;
  border-color: var(--reward-gold);
  box-shadow: 0 0 0 3px rgba(245,197,66,0.15);
}
.manual-steps {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.manual-step-tag {
  background: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  border: 1px solid #E8D5A8;
}

/* Empty state */
.empty-prompt {
  text-align: center;
  padding: 24px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.empty-msg {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 20px;
}
.empty-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Done state */
.done-state {
  text-align: center;
  padding: 40px 16px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.done-msg {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Skipped state */
.skipped-state {
  text-align: center;
  padding: 20px 16px;
}
.skipped-msg {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
}

/* Mascot */
.mascot {
  width: 100px; height: 100px;
  background: var(--bg-lavender-deep);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  animation: mascotBreathe 3s ease-in-out infinite;
}
.mascot-eyes {
  position: absolute;
  top: 35%; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
}
.mascot-eye {
  width: 14px; height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  animation: blink 4s ease-in-out infinite;
}
.mascot-mouth {
  position: absolute;
  top: 62%; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 8px;
  background: var(--rare-pink);
  border-radius: 0 0 50% 50%;
}
.mascot-cheeks {
  position: absolute;
  top: 50%; width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}
.mascot-cheek {
  width: 16px; height: 10px;
  background: rgba(232, 145, 185, 0.3);
  border-radius: 50%;
}

/* Garden teaser */
.garden-teaser {
  text-align: center;
  padding: 12px 0 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Garden */
.garden {
  padding-top: 16px;
  margin-top: auto;
}
.garden-scene {
  width: 100%;
  height: 140px;
  background: linear-gradient(180deg, transparent 50%, var(--bg-lavender) 50%, #DDD4EA 100%);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.garden-plant {
  position: absolute;
  bottom: 50px;
  font-size: 28px;
  transition: all 0.5s;
  animation: sway 4s ease-in-out infinite;
}
.garden-plant.sleeping {
  filter: grayscale(0.7) brightness(0.7);
  animation: none;
}
.garden-label {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Step completion animation */
@keyframes step-check {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.7); background: var(--accent); color: white; }
  60%  { transform: scale(0.85); }
  100% { transform: scale(1); background: var(--accent); color: white; }
}
.step-icon.completing {
  animation: step-check 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Star burst particles from done button */
@keyframes star-fly {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3); }
}
.star-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 15px;
  animation: star-fly 0.65s ease-out forwards;
}

/* Garden plant sprouting in */
@keyframes plant-sprout {
  0%   { transform: scale(0) translateY(20px); opacity: 0; }
  60%  { transform: scale(1.3) translateY(-5px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.garden-plant.sprouting {
  animation: plant-sprout 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* Disabled state for done/skip while processing */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

/* Animations */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}
@keyframes breatheInner {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 1; }
}
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 16px rgba(124,92,191,0.3); }
}
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes colorPulse {
  0% { box-shadow: 0 4px 20px var(--card-shadow); }
  50% { box-shadow: 0 4px 30px var(--accent-glow), 0 0 0 3px var(--accent-glow); }
  100% { box-shadow: 0 4px 20px var(--card-shadow); }
}
@keyframes rewardFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rewardPop {
  0% { transform: scale(0) rotate(-10deg); }
  50% { transform: scale(1.15) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes mascotBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@keyframes blink {
  0%, 95%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.1); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

/* XP badge */
.xp-badge {
  background: var(--button-dark);
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: center;
}
.xp-badge.bump {
  animation: xp-bump 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xp-bump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* Floating XP text */
@keyframes float-xp {
  0%   { opacity: 1; transform: translate(-50%, 0) scale(1); }
  65%  { opacity: 1; transform: translate(-50%, -46px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -72px) scale(0.85); }
}
.floating-xp {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--accent);
  background: var(--accent-surface);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  animation: float-xp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Task complete overlay */
@keyframes overlay-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes overlay-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); }
}
.task-complete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 247, 242, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: pointer;
  animation: overlay-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.task-complete-title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--text-primary);
  margin-top: 16px;
}
.task-complete-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}
.task-complete-xp {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-surface);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-top: 12px;
}

/* Confetti particles */
@keyframes confetti-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) rotate(var(--cr)); opacity: 0; }
}
.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  animation: confetti-fall ease-out forwards;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reward-overlay { animation: none; }
  .reward-emoji { animation: none; }
}

/* Desktop: just center it */
@media (min-width: 640px) {
  body { display: flex; justify-content: center; }
}
