* { box-sizing: border-box; }
:root {
  --ink: #15382a;
  --green: #2f9b56;
  --green-dark: #226f3d;
  --light: #f6fbff;
  --card: rgba(255,255,255,.94);
  font-family: "Trebuchet MS", "Comic Sans MS", "Segoe UI", Arial, sans-serif;
}
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(103, 204, 135, .20), transparent 24rem),
    radial-gradient(circle at top right, rgba(71, 182, 241, .18), transparent 22rem),
    linear-gradient(180deg, #f5fbff 0%, #eef9f0 60%, #e4f4dc 100%);
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  left: -10%; right: -10%; bottom: -40px;
  height: 110px;
  background: radial-gradient(circle at 20% 40%, #8fdc77 0 60px, transparent 61px),
              radial-gradient(circle at 50% 40%, #7fd26b 0 70px, transparent 71px),
              radial-gradient(circle at 80% 40%, #9fe280 0 65px, transparent 66px);
  z-index: -1;
}
.sky-decor {
  position: fixed;
  width: 130px; height: 48px; border-radius: 48px; background: rgba(255,255,255,.72); z-index: -1;
  filter: blur(0.2px);
}
.sky-decor::before, .sky-decor::after {
  content: ""; position: absolute; background: inherit; border-radius: 50%;
}
.sky-1 { top: 70px; left: 9%; }
.sky-1::before { width: 44px; height: 44px; left: 16px; top: -18px; }
.sky-1::after { width: 60px; height: 60px; left: 48px; top: -28px; }
.sky-2 { top: 120px; right: 8%; width: 110px; }
.sky-2::before { width: 40px; height: 40px; left: 18px; top: -15px; }
.sky-2::after { width: 52px; height: 52px; left: 46px; top: -23px; }
.app { width: min(1320px, calc(100% - 24px)); margin: 0 auto; padding: 22px 0 44px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 22px; }
.brand-area { flex: 1; }
.brand-card {
  display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 28px; padding: 14px 18px;
  border: 1px solid rgba(25, 86, 60, .12); box-shadow: 0 18px 42px rgba(37, 87, 58, .10);
}
.brand-logo { width: 106px; height: 106px; object-fit: cover; border-radius: 22px; flex: 0 0 auto; }
.eyebrow { font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: #16785f; font-size: .88rem; }
.brand-copy h1 { margin: 4px 0 6px; font-size: clamp(2rem, 5vw, 3.1rem); line-height: .95; color: #1f713e; }
.brand-copy p { margin: 0; color: #4d6758; font-size: 1.08rem; }
.score-panel {
  display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 22px; padding: 12px;
  border: 1px solid rgba(25, 86, 60, .12); box-shadow: 0 18px 42px rgba(37, 87, 58, .10);
}
.score-panel > div { min-width: 90px; text-align: center; }
.score-panel span { display: block; font-size: 1.5rem; font-weight: 900; }
.score-panel small { color: #607468; }
.icon-button, .secondary-button, .primary-button { border: 0; cursor: pointer; font: inherit; }
.icon-button { width: 50px; height: 50px; border-radius: 50%; background: #def6e6; font-size: 1.15rem; }
.zones-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.zone {
  min-height: 320px; border: 0; border-radius: 36px; padding: 18px 16px 20px; color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px;
  cursor: pointer; position: relative; overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  box-shadow: 0 22px 44px rgba(24, 73, 48, .17);
}
.zone::before {
  content: ""; position: absolute; inset: 10px auto auto 10px; width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.10);
}
.zone::after {
  content: ""; position: absolute; right: -18px; bottom: -22px; width: 95px; height: 95px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.zone:hover, .zone:focus-visible { transform: translateY(-6px); filter: brightness(1.03); }
.zone strong { font-size: 1.5rem; line-height: 1.05; position: relative; z-index: 1; }
.zone small { font-size: 1rem; line-height: 1.35; opacity: .98; position: relative; z-index: 1; }
.zone-illustration { position: relative; z-index: 1; display: grid; place-items: center; margin-top: 4px; }
.bubble {
  width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.19); box-shadow: inset 0 2px 12px rgba(255,255,255,.18);
}
.bubble img { width: 122px; height: 122px; object-fit: contain; }
.phone-card { width: 150px; height: 150px; }
.phone-frame {
  width: 92px; height: 148px; background: linear-gradient(180deg, #30343a, #15171b); border-radius: 26px; padding: 16px 10px;
  box-shadow: 0 16px 26px rgba(0,0,0,.28); position: relative;
}
.phone-frame::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 7px; border-radius: 0 0 8px 8px; background: #0e1012;
}
.phone-frame .jgz-logo { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 16px; padding: 9px; }
.zone-blue { background: linear-gradient(180deg, #30a2f6 0%, #1778cf 100%); }
.zone-compost { background: linear-gradient(180deg, #88be35 0%, #5a8926 100%); }
.zone-jgz { background: linear-gradient(180deg, #39bab3 0%, #18767a 100%); }
.zone-green { background: linear-gradient(180deg, #34b25e 0%, #22834a 100%); }
.zone.correct-flash { animation: correctFlash .55s ease; }
.zone.wrong-flash { animation: wrongFlash .55s ease; }
.message-panel {
  display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 22px; min-height: 96px; padding: 18px 22px; margin-bottom: 22px;
  border: 1px solid rgba(25, 86, 60, .12); box-shadow: 0 12px 30px rgba(37, 87, 58, .08);
}
.message-panel.success { border-color: #4bb674; background: #effcf4; }
.message-panel.error { border-color: #e06d63; background: #fff5f3; }
.message-icon { font-size: 2.2rem; }
.message-panel strong { font-size: 1.18rem; }
.message-panel p { margin: 5px 0 0; color: #53685b; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 1.8rem; }
.secondary-button { border-radius: 14px; padding: 11px 16px; background: #dff4e6; color: #1f6237; font-weight: 800; }
.items-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.item-card {
  min-height: 190px; background: var(--card); border: 3px solid transparent; border-radius: 28px; padding: 14px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 12px 28px rgba(41, 91, 57, .09);
  transition: transform .16s ease, border-color .16s ease, opacity .2s ease; position: relative;
}
.item-card::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: rgba(34,131,74,.10);
}
.item-card:hover, .item-card:focus-visible { transform: translateY(-4px); }
.item-card.selected { border-color: #35a861; transform: translateY(-5px) scale(1.025); }
.item-card.removed { opacity: 0; transform: scale(.7); pointer-events: none; }
.item-card img { width: 92px; height: 92px; object-fit: contain; }
.item-card strong { text-align: center; font-size: 1.02rem; line-height: 1.18; }
.item-card small { color: #6b7a71; text-align: center; line-height: 1.3; font-size: .92rem; }
.modal { position: fixed; inset: 0; background: rgba(14, 35, 23, .58); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal.hidden { display: none; }
.modal-card { width: min(520px, 100%); text-align: center; background: #fff; border-radius: 30px; padding: 34px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.result-medal { font-size: 4rem; }
.modal-card h2 { margin: 8px 0; font-size: 2.2rem; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.result-stats div { background: #edf8f0; border-radius: 16px; padding: 15px 8px; }
.result-stats strong, .result-stats span { display: block; }
.result-stats strong { font-size: 1.5rem; }
.tip { color: #50645a; }
.primary-button { width: 100%; padding: 15px 20px; border-radius: 15px; background: #22884b; color: #fff; font-weight: 900; font-size: 1.05rem; }
@keyframes correctFlash { 50% { outline: 10px solid rgba(74,210,119,.35); transform: scale(1.03); } }
@keyframes wrongFlash { 25%,75% { transform: translateX(-7px); } 50% { outline: 10px solid rgba(232,89,76,.25); } }
@media (max-width: 1120px) {
  .zones-grid { grid-template-columns: repeat(2, 1fr); }
  .items-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .score-panel { justify-content: space-between; }
  .items-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .app { width: min(100% - 14px, 1320px); padding-top: 14px; }
  .brand-card { align-items: flex-start; }
  .brand-logo { width: 88px; height: 88px; }
  .zones-grid { grid-template-columns: 1fr; }
  .zone { min-height: 280px; }
  .items-grid { grid-template-columns: repeat(2, 1fr); }
  .item-card { min-height: 176px; }
}
