:root {
  color-scheme: dark; background: #193725; color: #fff4d1;
  font: 16px/1.35 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { position: relative; width: min(100% - 32px, 600px); margin: 24px auto; text-align: center; }
h1 { margin: 0 52px 16px; font-size: clamp(2rem, 8vw, 3.75rem); line-height: 1; text-wrap: balance; }
.scene {
  position: relative; display: grid; place-items: center; aspect-ratio: 16/9;
  border: 2px solid #a7c78c; border-radius: 24px;
  background: #315a3d url('river.jpg') center / cover; overflow: hidden;
}
.object { display: block; position: relative; filter: drop-shadow(0 6px 6px #152d19); }
.object[data-kind=plastic], .object[data-kind=paper] { --size: clamp(68px, 17vw, 116px); }
.token { display: block; position: relative; --size: 45px; }
.object[data-kind=plastic], .token.plastic {
  width: calc(var(--size) * .54); height: var(--size);
  background: #b7eeee; border: 3px solid #225151;
  clip-path: polygon(34% 0, 66% 0, 66% 23%, 93% 36%, 93% 100%, 7% 100%, 7% 36%, 34% 23%);
}
.object[data-kind=plastic]::after, .token.plastic::after {
  content: ''; position: absolute; inset: 56% 0 14%; background: #268176; border-block: 2px solid #225151;
}
.object[data-kind=paper], .token.paper {
  width: var(--size); height: calc(var(--size) * .78);
  background: #f0bf7a; border: 3px solid #623a17; border-radius: 4px;
  box-shadow: inset -7px -6px #c38947;
}
.object[data-kind=paper]::after, .token.paper::after {
  content: ''; position: absolute; inset: 0 40% 42%; background: #ffe3b4; border-inline: 1px solid #a5723f;
}
.object[data-kind=done] {
  width: 76px; height: 86px; background: #c5f8ee; border: 4px solid #327667;
  clip-path: polygon(25% 0, 75% 0, 100% 38%, 50% 100%, 0 38%);
}
.object[data-kind] { animation: land 400ms cubic-bezier(.22,1,.36,1) both; }
.scene[data-sorted]::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translateX(-50%);
  width: 120px; height: 62px; border: 3px solid #225151; border-radius: 8px;
  background: #d3eee2; box-shadow: inset 0 7px #268176; pointer-events: none;
}
@keyframes land { from { transform: translateY(12px); opacity: .4; } }
button {
  background: #ffda7c; color: #20351f; border: 2px solid #243b2b; border-radius: 16px;
  font: 700 1rem/1.15 system-ui, sans-serif; min-height: 52px; cursor: pointer;
}
button:focus-visible, a:focus-visible { outline: 3px solid #fff9d8; outline-offset: 4px; }
button:disabled { opacity: .7; cursor: wait; }
#bins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 380px; margin: auto; }
#bins button { display: grid; place-items: center; gap: 8px; padding: 12px 8px; background: #d3eee2; }
#bins button + button { background: #fff1bd; }
#bins button[data-sort-hint] { outline: 3px dashed #fff9d8; outline-offset: 3px; }
#bins button[data-sort-hint]:focus-visible { outline-style: solid; }
.primary { min-width: 160px; padding: 8px 24px; }
#sound { position: absolute; right: 0; top: 0; font-size: 1.4rem; width: 44px; min-height: 44px; border-radius: 50%; }
#sound[aria-pressed=false] { background: #2b5034; color: #fff4d1; text-decoration: line-through; }
#prompt { min-height: 1.35em; margin: 12px auto; font-size: clamp(1.05rem, 4vw, 1.3rem); }
.prompt-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.prompt-row #prompt { margin-inline: 0; }
#repeat-voice { flex: 0 0 44px; min-height: 44px; border-radius: 50%; background: #d3eee2; font-size: 1.25rem; }
.return { display: block; margin-top: 20px; color: #e5efcc; }
@media (prefers-reduced-motion: reduce) { .object[data-kind] { animation: none; } }
