:root {
  --bg-top: #f3efe2;
  --bg-bottom: #d8efd4;
  --ink: #2f3424;
  --muted: #687257;
  --card: rgba(255, 251, 244, 0.88);
  --card-strong: #fffaf2;
  --line: rgba(64, 84, 49, 0.14);
  --shadow: 0 24px 60px rgba(77, 96, 51, 0.18);
  --green: #3f8f57;
  --green-deep: #2f6b41;
  --orange: #e9a441;
  --blue: #4c8fd9;
  --blue-deep: #2e6aa9;
  --yellow: #e7bf45;
  --yellow-deep: #a67f1f;
  --teal: #4eaa9b;
  --teal-deep: #2e6f66;
  --red: #d86655;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 220, 146, 0.5), transparent 28%),
    radial-gradient(circle at right 15%, rgba(124, 197, 150, 0.38), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  overflow-x: hidden;
}

body:not(.device-ready) {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.32;
  pointer-events: none;
}

button {
  font: inherit;
}

.device-gate {
  position: relative;
  min-height: 100vh;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 220, 146, 0.5), transparent 28%),
    radial-gradient(circle at right 15%, rgba(124, 197, 150, 0.38), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.device-card {
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 244, 0.95);
  box-shadow: var(--shadow);
  text-align: center;
}

.device-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.device-text {
  margin: 14px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.device-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px - var(--theme-dock-gap, 0px)));
  margin: 22px auto;
  display: grid;
  gap: 20px;
}

body.device-ready {
  --theme-dock-gap: 0px;
}

@media (min-width: 780px) {
  body.device-ready {
    --theme-dock-gap: 58px;
  }
}

body:not(.device-ready) .page-shell {
  display: none;
}

.hero-card,
.game-card,
.trash-card,
.hint-card,
.bin-button,
.mascot-card {
  backdrop-filter: blur(16px);
}

.hero-card,
.game-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 320px;
  gap: 24px;
}

.eyebrow,
.section-label,
.controls-note,
.mascot-text,
#timer-label,
#hint-text {
  color: var(--muted);
}

.bin-button .bin-desc {
  color: #0f2415;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.game-header h2,
.trash-card h3 {
  margin: 0;
  line-height: 1.05;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 6vw, 4.9rem);
}

.lead {
  max-width: 58ch;
  margin: 18px 0 0;
  font-size: 1.06rem;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.game-heading {
  display: grid;
  gap: 12px;
}

.meta-row,
.final-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.progress-pill {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(64, 84, 49, 0.08);
}

.progress-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-pill strong {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
}

.primary-button,
.secondary-button,
.bin-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  padding: 0 22px;
  border-radius: 18px;
}

.primary-button {
  background: linear-gradient(135deg, var(--green), #63b46f);
  color: #f7ffef;
  box-shadow: 0 14px 30px rgba(63, 143, 87, 0.26);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1px solid rgba(64, 84, 49, 0.12);
}

.controls-note {
  margin-top: 14px;
  line-height: 1.5;
}

body:not(.device-ready) .theme-dock {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-dock {
  position: fixed;
  z-index: 25;
  right: max(10px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
}

.theme-dock-panel[hidden] {
  display: none !important;
}

.theme-dock-panel:not([hidden]) {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(156px, calc(100vw - 24px));
  animation: theme-dock-pop 0.2s ease-out;
}

@keyframes theme-dock-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.theme-dock-toggle {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-dock-toggle:hover {
  transform: scale(1.05);
}

.theme-dock-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.theme-dock-toggle-face {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff4dc 48%, #1e2620 52%);
  box-shadow: inset 0 0 0 1px rgba(64, 84, 49, 0.12);
}

.theme-dock-inner {
  padding: 14px 12px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.theme-dock-label {
  margin: 0 0 6px;
}

.theme-dock-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 700;
}

.scheme-switcher {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.scheme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(64, 84, 49, 0.12);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  font: inherit;
  color: inherit;
}

.scheme-option:hover {
  transform: translateY(-1px);
}

.scheme-option.active {
  border-color: rgba(63, 143, 87, 0.45);
  box-shadow: 0 0 0 2px rgba(63, 143, 87, 0.2);
  background: rgba(255, 255, 255, 0.78);
}

.scheme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(64, 84, 49, 0.12);
}

.light-swatch {
  background: linear-gradient(145deg, #fffef8, #d4e8ca);
}

.dark-swatch {
  background: linear-gradient(145deg, #4a5650, #1a221c);
}

.scheme-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scheme-option-copy strong {
  font-size: 0.92rem;
}

.scheme-option-copy span {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.3;
}

.mascot-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, #fffefb, #eef6dc);
  text-align: center;
}

.mascot-glow {
  position: absolute;
  inset: auto 20px 26px;
  height: 40px;
  border-radius: 50%;
  background: rgba(84, 137, 84, 0.18);
  filter: blur(12px);
}

.mascot-portrait {
  position: relative;
  z-index: 1;
  width: min(100%, 280px);
  height: auto;
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #fffaf2);
  border: 1px solid rgba(64, 84, 49, 0.08);
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 20px 26px rgba(100, 97, 41, 0.18));
}

.mascot-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.mascot-text {
  margin: 8px 0 0;
  line-height: 1.55;
}

.game-card {
  padding: 28px;
}

.hidden {
  display: none !important;
}

.game-header,
.challenge-panel {
  display: grid;
  gap: 18px;
}

.game-header {
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
}

.game-header h2 {
  margin-top: 4px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.progress-block {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(64, 84, 49, 0.1);
}

.progress-track {
  margin-top: 10px;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(64, 84, 49, 0.12);
}

.progress-bar {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79c35f, #f0c24e, #dd7858);
  transform-origin: left center;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mode-chip {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(64, 84, 49, 0.12);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
}

.mode-chip.active {
  background: linear-gradient(135deg, #4ea965, #7bc67f);
  color: #f7ffef;
}

.tutorial-card {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(64, 84, 49, 0.1);
}

.tutorial-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.tutorial-card p:last-child {
  margin: 10px 0 0;
  line-height: 1.55;
  color: var(--muted);
}

.challenge-panel {
  margin-top: 20px;
  grid-template-columns: minmax(0, 1.15fr) 300px;
}

.trash-stage {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.7), transparent 35%),
    linear-gradient(180deg, rgba(142, 201, 142, 0.34), rgba(255, 255, 255, 0.38));
  border: 1px solid rgba(64, 84, 49, 0.1);
}

.trash-card {
  width: min(100%, 420px);
  min-height: 220px;
  padding: 24px;
  border-radius: 30px;
  text-align: center;
  background: var(--card-strong);
  border: 1px solid rgba(64, 84, 49, 0.1);
  box-shadow: 0 24px 40px rgba(96, 118, 67, 0.18);
  animation: float 2.8s ease-in-out infinite;
}

.trash-emoji {
  margin: 0;
  font-size: clamp(4.5rem, 8vw, 6.5rem);
  line-height: 1;
}

.trash-card h3 {
  margin-top: 12px;
  font-size: 2rem;
}

.trash-card p {
  margin: 12px 0 0;
  line-height: 1.6;
}

.trash-card.dragging {
  opacity: 0.68;
  transform: scale(0.98);
}

.drag-note {
  margin-top: 10px;
  color: var(--blue-deep);
  font-weight: 700;
}

.hint-card {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(64, 84, 49, 0.1);
}

#hint-text {
  margin: 10px 0 0;
  line-height: 1.6;
}

.mascot-quote {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(76, 143, 217, 0.12);
  color: var(--blue-deep);
  font-weight: 700;
  line-height: 1.45;
}

.result-badge {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(64, 84, 49, 0.08);
  font-weight: 700;
}

.result-badge.success {
  background: rgba(63, 143, 87, 0.18);
  color: var(--green-deep);
}

.result-badge.error {
  background: rgba(216, 102, 85, 0.14);
  color: #9c3f33;
}

.result-badge.info {
  background: rgba(76, 143, 217, 0.14);
  color: var(--blue-deep);
}

.bins-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.final-card {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(64, 84, 49, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 241, 173, 0.72), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 220, 0.92));
  box-shadow: 0 18px 40px rgba(125, 131, 60, 0.16);
}

.final-card h3 {
  margin: 0;
  font-size: 1.8rem;
}

.final-card p {
  margin: 12px 0 0;
  line-height: 1.6;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti-layer span {
  position: absolute;
  top: -18px;
  width: 12px;
  height: 26px;
  border-radius: 999px;
  opacity: 0.8;
  animation: confetti-fall 3.2s linear infinite;
}

.confetti-layer span:nth-child(1) {
  left: 10%;
  background: #f0b84b;
}

.confetti-layer span:nth-child(2) {
  left: 25%;
  background: #5cb8a8;
  animation-delay: 0.4s;
}

.confetti-layer span:nth-child(3) {
  left: 42%;
  background: #73b0f0;
  animation-delay: 0.9s;
}

.confetti-layer span:nth-child(4) {
  left: 58%;
  background: #7bc67f;
  animation-delay: 0.2s;
}

.confetti-layer span:nth-child(5) {
  left: 75%;
  background: #df8e3a;
  animation-delay: 1.2s;
}

.confetti-layer span:nth-child(6) {
  left: 88%;
  background: #f16b7d;
  animation-delay: 0.7s;
}

.gift-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f0b84b, #df8e3a);
  color: #fffdf7;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(223, 142, 58, 0.24);
}

.gift-link:hover {
  transform: translateY(-2px);
}

body.device-ready .device-gate {
  display: none;
}

body.phone-mode .page-shell {
  width: min(100% - 12px - var(--theme-dock-gap, 0px), 760px);
  gap: 10px;
  margin: 6px auto 12px;
}

body.phone-mode .hero-card,
body.phone-mode .game-card {
  padding: 14px;
  border-radius: 20px;
}

body.phone-mode .hero-card,
body.phone-mode .game-header,
body.phone-mode .challenge-panel {
  grid-template-columns: 1fr;
}

body.phone-mode .hero-copy h1 {
  max-width: none;
  font-size: 2.2rem;
}

body.phone-mode .lead {
  margin-top: 12px;
  font-size: 0.98rem;
  line-height: 1.5;
}

body.phone-mode .hero-actions {
  margin-top: 14px;
  flex-direction: column;
}

body.phone-mode .theme-dock {
  top: max(8px, env(safe-area-inset-top));
  bottom: auto;
  transform: none;
}

body.phone-mode .theme-dock-panel:not([hidden]) {
  top: calc(100% + 8px);
  bottom: auto;
}

body.phone-mode .theme-dock-inner {
  padding: 12px 10px;
}

body.phone-mode .theme-dock {
  width: 42px;
  height: 42px;
}

body.phone-mode .theme-dock-toggle {
  width: 42px;
  height: 42px;
}

body.phone-mode .primary-button,
body.phone-mode .secondary-button {
  width: 100%;
}

body.phone-mode .mascot-card {
  padding: 16px;
}

body.phone-mode .mascot-portrait {
  width: min(100%, 190px);
  margin-bottom: 10px;
}

body.phone-mode .game-header {
  gap: 10px;
}

body.phone-mode .progress-block {
  padding: 12px;
}

body.phone-mode .meta-row,
body.phone-mode .final-stats {
  grid-template-columns: 1fr;
  gap: 8px;
}

body.phone-mode .challenge-panel {
  margin-top: 10px;
  gap: 10px;
}

body.phone-mode .trash-stage {
  min-height: 180px;
  padding: 10px;
}

body.phone-mode .trash-card {
  min-height: 150px;
  padding: 16px;
  animation: none;
}

body.phone-mode .trash-emoji {
  font-size: clamp(4rem, 16vw, 5.25rem);
  line-height: 1;
}

body.phone-mode .trash-card h3 {
  margin-top: 8px;
  font-size: 1.35rem;
}

body.phone-mode .trash-card p,
body.phone-mode #hint-text,
body.phone-mode .controls-note {
  line-height: 1.45;
  font-size: 0.95rem;
}

body.phone-mode .tutorial-card {
  margin-top: 10px;
  padding: 14px;
}

body.phone-mode .hint-card {
  padding: 14px;
}

body.phone-mode .result-badge {
  margin-top: 12px;
  padding: 12px 14px;
}

body.phone-mode .bins-grid {
  margin-top: 10px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.phone-mode .bin-button {
  min-height: 112px;
  padding: 14px;
  gap: 6px;
  border-radius: 18px;
}

body.phone-mode .bin-button strong {
  font-size: 1rem;
}

body.phone-mode .bin-button .bin-icon {
  font-size: clamp(1.75rem, 9vw, 2.1rem);
}

body.phone-mode .bin-button .bin-desc {
  font-size: 0.83rem;
  line-height: 1.35;
}

body.phone-mode .final-card {
  margin-top: 12px;
  padding: 16px;
}

body.phone-mode .mode-switch {
  grid-template-columns: 1fr;
}

.bin-button {
  min-height: 150px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  border-radius: 24px;
  color: #0f2415;
  text-align: left;
  box-shadow: 0 18px 34px rgba(95, 112, 61, 0.12);
}

.bin-button strong {
  font-size: 1.18rem;
  color: #081a0d;
}

.bin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.bin-icon {
  font-size: 2.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.bin-key {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.56);
}

.bin-button.plastic {
  background: linear-gradient(180deg, #a9d4ff, #73b0f0);
}

.bin-button.paper {
  background: linear-gradient(180deg, #ffe29c, #e9bc5c);
}

.bin-button.glass {
  background: linear-gradient(180deg, #8be0d0, #5cb8a8);
}

.bin-button.organic {
  background: linear-gradient(180deg, #a4dda2, #73ba70);
}

.bin-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.bin-button:active,
.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

.bin-button.correct {
  box-shadow: 0 0 0 4px rgba(63, 143, 87, 0.36);
}

.bin-button.wrong {
  box-shadow: 0 0 0 4px rgba(216, 102, 85, 0.34);
}

.bin-button:disabled {
  cursor: default;
  opacity: 0.88;
}

html[data-scheme="dark"] {
  --bg-top: #1c2219;
  --bg-bottom: #111610;
  --ink: #e6ebe1;
  --muted: #9aaa8c;
  --card: rgba(32, 40, 30, 0.94);
  --card-strong: #283224;
  --line: rgba(210, 230, 190, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --green: #5cb87a;
  --green-deep: #8fd9a4;
  --orange: #f0b85a;
  --blue: #6ba3e8;
  --blue-deep: #a8c9f5;
  --yellow: #e7c85a;
  --yellow-deep: #d4a832;
  --teal: #5ec4b3;
  --teal-deep: #8edfd2;
  --red: #e88373;
}

html[data-scheme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(90, 120, 70, 0.35), transparent 28%),
    radial-gradient(circle at right 15%, rgba(60, 100, 80, 0.25), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

html[data-scheme="dark"] body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  opacity: 0.35;
}

html[data-scheme="dark"] .device-gate {
  background:
    radial-gradient(circle at top left, rgba(90, 120, 70, 0.35), transparent 28%),
    radial-gradient(circle at right 15%, rgba(60, 100, 80, 0.25), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

html[data-scheme="dark"] .device-card {
  background: rgba(36, 44, 34, 0.96);
}

html[data-scheme="dark"] .theme-dock-inner,
html[data-scheme="dark"] .theme-dock-toggle {
  background: var(--card);
  border-color: var(--line);
}

html[data-scheme="dark"] .theme-dock-toggle-face {
  background: linear-gradient(135deg, #c8d4b8 48%, #0f1410 52%);
  box-shadow: inset 0 0 0 1px rgba(200, 220, 180, 0.15);
}

html[data-scheme="dark"] .scheme-option {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(200, 220, 180, 0.14);
}

html[data-scheme="dark"] .scheme-option.active {
  border-color: rgba(92, 184, 122, 0.5);
  box-shadow: 0 0 0 2px rgba(92, 184, 122, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

html[data-scheme="dark"] .progress-pill {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(200, 220, 180, 0.1);
}

html[data-scheme="dark"] .secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: rgba(200, 220, 180, 0.15);
}

html[data-scheme="dark"] .mascot-card {
  background:
    radial-gradient(circle at top, rgba(70, 90, 60, 0.45), transparent 42%),
    linear-gradient(180deg, #2a3328, #1f281c);
}

html[data-scheme="dark"] .mascot-glow {
  background: rgba(100, 160, 100, 0.28);
}

html[data-scheme="dark"] .mascot-portrait {
  background: linear-gradient(180deg, #363f32, #2a3326);
  border-color: rgba(200, 220, 180, 0.12);
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.35));
}

html[data-scheme="dark"] .progress-block {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(200, 220, 180, 0.12);
}

html[data-scheme="dark"] .progress-track {
  background: rgba(255, 255, 255, 0.12);
}

html[data-scheme="dark"] .mode-chip {
  border-color: rgba(200, 220, 180, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

html[data-scheme="dark"] .mode-chip.active {
  background: linear-gradient(135deg, #4a9a5f, #5fb078);
  color: #f7ffef;
}

html[data-scheme="dark"] .tutorial-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(200, 220, 180, 0.12);
}

html[data-scheme="dark"] .trash-stage {
  background:
    radial-gradient(circle at 50% 20%, rgba(80, 120, 80, 0.35), transparent 35%),
    linear-gradient(180deg, rgba(80, 130, 80, 0.22), rgba(40, 50, 38, 0.55));
  border-color: rgba(200, 220, 180, 0.12);
}

html[data-scheme="dark"] .trash-card {
  border-color: rgba(200, 220, 180, 0.12);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
}

html[data-scheme="dark"] .hint-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(200, 220, 180, 0.12);
}

html[data-scheme="dark"] .mascot-quote {
  background: rgba(76, 143, 217, 0.22);
}

html[data-scheme="dark"] .result-badge {
  background: rgba(255, 255, 255, 0.06);
}

html[data-scheme="dark"] .result-badge.success {
  background: rgba(63, 143, 87, 0.28);
}

html[data-scheme="dark"] .result-badge.error {
  background: rgba(216, 102, 85, 0.22);
  color: #f0a090;
}

html[data-scheme="dark"] .result-badge.info {
  background: rgba(76, 143, 217, 0.22);
}

html[data-scheme="dark"] .final-card {
  border-color: rgba(200, 220, 180, 0.12);
  background:
    radial-gradient(circle at top right, rgba(200, 170, 80, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(45, 52, 40, 0.95), rgba(35, 42, 32, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

html[data-scheme="dark"] .primary-button {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

html[data-scheme="dark"] .gift-link {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

html[data-scheme="dark"] .bin-button {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  color: #061208;
}

html[data-scheme="dark"] .bin-key {
  background: rgba(255, 255, 255, 0.5);
}

html[data-scheme="dark"] .bin-button strong {
  color: #040d07;
}

html[data-scheme="dark"] .bin-button .bin-desc {
  color: #0a1810;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-20px) rotate(0deg);
  }

  100% {
    transform: translateY(320px) rotate(220deg);
  }
}

@media (max-width: 980px) {
  .hero-card,
  .game-header,
  .challenge-panel,
  .bins-grid {
    grid-template-columns: 1fr;
  }

  .meta-row,
  .final-stats {
    grid-template-columns: 1fr;
  }

  .mascot-card {
    max-width: 380px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  body::before {
    display: none;
  }

  .page-shell {
    width: min(100% - 16px - var(--theme-dock-gap, 0px), 1180px);
    margin: 8px auto 14px;
  }

  .hero-card,
  .game-card {
    padding: 18px;
    border-radius: 24px;
  }

  .hero-card,
  .game-card,
  .trash-card,
  .hint-card,
  .bin-button,
  .mascot-card {
    backdrop-filter: none;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 2.5rem;
  }

  .trash-card {
    min-height: 200px;
    padding: 20px;
    animation: none;
  }

  .trash-card h3 {
    font-size: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .mascot-portrait {
    width: min(100%, 220px);
  }

  .bin-button {
    min-height: 132px;
  }

  .device-card {
    padding: 20px;
    border-radius: 24px;
    width: min(100%, 100%);
  }

  .device-actions {
    grid-template-columns: 1fr;
  }
}
