/* Игры: «Очисти реку», «Тонет — не тонет», «Найди протечки», «Собери водопровод», «Раскраски» */
.og, .tn, .pt, .tb, .rk { padding: 18px; }
.og-top, .tn-top, .pt-top, .tb-top, .rk-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-weight: 800; margin-bottom: 10px; }

/* Очисти реку */
.og-scene { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 1000 / 520; box-shadow: inset 0 0 0 1px var(--line); }
.og-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#og-dirty { transition: opacity 1s ease; }
.og-it img, .og-a img { display: block; width: clamp(36px, 6.6vw, 66px); height: clamp(36px, 6.6vw, 66px); object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(40, 50, 40, .25)); pointer-events: none; -webkit-user-drag: none; }
.og-a img { width: clamp(38px, 7.4vw, 74px); height: clamp(38px, 7.4vw, 74px); }
.og-bin span img { display: block; width: 36px; height: 36px; object-fit: contain; }
.og-items, .og-life { position: absolute; inset: 0; }
.og-it { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; cursor: pointer; font-size: clamp(28px, 5.4vw, 52px); line-height: 1;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); transition: transform .2s ease, opacity .5s ease; touch-action: none; padding: 4px; }
.og-it.wet { animation: og-bob 2.6s ease-in-out infinite; }
.og-it:hover { transform: translate(-50%, -50%) scale(1.12); }
.og-it.sel { outline: 4px solid var(--sun); border-radius: 50%; background: #fff8; animation: none; transform: translate(-50%, -50%) scale(1.2); }
.og-it.dragging { z-index: 5; animation: none; transition: none; }
.og-it.gone { animation: none; transition: transform .6s cubic-bezier(.5, -.3, .7, 1), opacity .6s ease; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; pointer-events: none; }
@keyframes og-bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }
.og-a { position: absolute; transform: translate(-50%, -50%); font-size: clamp(26px, 5vw, 48px); animation: og-in 1s ease both, og-bob 3s ease-in-out 1s infinite; pointer-events: none; }
@keyframes og-in { from { opacity: 0; transform: translate(-50%, 20%) scale(.3); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.og-bins { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .og-bins { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.og-bin { display: grid; justify-items: center; gap: 2px; padding: 12px 4px 10px; border-radius: 16px 16px 22px 22px; border: 3px solid var(--c);
  background: linear-gradient(180deg, #fff 0, #fff 30%, color-mix(in srgb, var(--c) 22%, #fff) 100%); font: 800 15px var(--text); color: var(--ink); cursor: pointer; }
.og-bin span { font-size: 30px; }
.og.choosing .og-bin { animation: og-pulse 1.2s ease-in-out infinite; }
@keyframes og-pulse { 50% { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(29, 58, 85, .15); } }
.og-bin.yum { animation: og-yum .5s ease !important; }
.og-bin.no { animation: og-no .45s ease !important; }
@keyframes og-yum { 40% { transform: scale(1.12); } }
@keyframes og-no { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.og-ok, .og-no, .tn-ok, .tn-no { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; font-weight: 700; }
.og-ok, .tn-ok { background: var(--leaf-soft); color: #2f6a2d; }
.og-no, .tn-no { background: var(--coral-soft); color: #a8483a; }

/* Тонет — не тонет */
.tn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .tn-grid { grid-template-columns: 1fr; } .tn-tank { order: -1; } }
.tn-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 10px; border-radius: 16px;
  background: linear-gradient(180deg, #fff 0, #fff 85%, #e8cfaa 85%, #d8b98f 100%); box-shadow: inset 0 0 0 1px var(--line); }
.tn-it { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer;
  font: 700 13px/1.15 var(--text); color: var(--ink); text-align: center; transition: transform .15s ease, border-color .15s ease; }
.tn-it span { font-size: 34px; line-height: 1.1; }
.tn-it:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--water); }
.tn-it.sel { border-color: var(--sun); box-shadow: 0 0 0 3px var(--sun-soft); transform: translateY(-3px); }
.tn-it.used { opacity: .35; cursor: default; }
.peeled, .tn-it.peeled span { filter: saturate(.55) brightness(1.2) contrast(.9); }
.tn-ask { margin-top: 12px; min-height: 120px; }
.tn-q { font-weight: 900; font-size: 21px; margin: 0 0 10px; }
.tn-q span { font-size: 32px; vertical-align: middle; }
.tn-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.tn-tank { position: relative; aspect-ratio: 4 / 3.2; border-radius: 10px 10px 26px 26px; border: 6px solid #cfe4f3; border-top-width: 3px;
  background: linear-gradient(180deg, #f6fbff 0, #f6fbff 14%, transparent 14%); overflow: hidden; box-shadow: 0 10px 24px rgba(29, 58, 85, .12); }
.tn-water { position: absolute; left: 0; right: 0; bottom: 0; top: 14%; background: linear-gradient(180deg, #9fd4f5, #4a9fd8); }
.tn-water::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 12px; border-radius: 50%; background: #c6e7fb; }
.tn-tank::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: repeating-radial-gradient(circle at 10% 50%, #d9c79e 0 6px, #c9b383 6px 10px); }
.tn-tank.splash .tn-water::before { animation: tn-splash .7s ease; }
@keyframes tn-splash { 30% { transform: scaleY(2.4); background: #fff; } }
.tn-in { position: absolute; inset: 0; z-index: 2; }
.tn-obj { position: absolute; top: var(--y); transform: translate(-50%, -50%); font-size: clamp(30px, 4.6vw, 46px); line-height: 1; }
.tn-obj.float { animation: tn-fall-f 1.2s cubic-bezier(.3, .8, .4, 1) both, og-bob 3s ease-in-out 1.2s infinite; }
.tn-obj.sink { animation: tn-fall-s 1.8s cubic-bezier(.4, .1, .6, 1) both; }
@keyframes tn-fall-f { 0% { top: -10%; } 45% { top: calc(var(--y) + 14%); } 100% { top: var(--y); } }
@keyframes tn-fall-s { 0% { top: -10%; } 30% { top: 22%; } 100% { top: var(--y); } }

/* Найди протечки */
.pt-scene { border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.pt-scene svg { display: block; width: 100%; height: auto; }
.pt-lbl { paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 5px; stroke-linejoin: round; }
.leak { cursor: pointer; outline: none; }
.leak .hit { fill: transparent; stroke: transparent; stroke-width: 4; transition: fill .3s, stroke .3s; }
.leak:hover .hit, .leak:focus-visible .hit { fill: rgba(246, 191, 60, .18); stroke: rgba(246, 191, 60, .7); stroke-dasharray: 8 6; }
.leak .drops circle { fill: #3d9be0; animation: pt-drip 1.1s ease-in infinite; }
.leak .drops circle:nth-child(2) { animation-delay: .5s; }
.leak .stream rect { fill: #3d9be0; transform-box: fill-box; transform-origin: top; animation: pt-stream .3s linear infinite alternate; }
.leak .ripple ellipse { fill: none; stroke: #3d9be0; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: pt-rip 1s ease-out infinite; }
.leak .puddle { fill: #8ec9f0; opacity: .8; transform-box: fill-box; transform-origin: center; animation: pt-pud 3s ease-in-out infinite alternate; }
@keyframes pt-drip { 0% { transform: translateY(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(46px); opacity: 0; } }
@keyframes pt-stream { from { transform: scaleY(1); } to { transform: scaleY(1.25); } }
@keyframes pt-rip { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@keyframes pt-pud { from { transform: scaleX(.8); } to { transform: scaleX(1.15); } }
.leak.fixed { cursor: default; }
.leak.fixed .drops, .leak.fixed .stream, .leak.fixed .ripple, .leak.fixed .puddle { display: none; }
.leak.fixed .hit { fill: rgba(95, 174, 90, .2); stroke: #5fae5a; stroke-dasharray: none; animation: pt-ok .6s ease; transform-box: fill-box; transform-origin: center; }
@keyframes pt-ok { 0% { transform: scale(.3); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* Собери водопровод */
.tb-wrap { display: grid; grid-template-columns: 64px minmax(0, 560px) 64px; justify-content: center; gap: 6px; }
@media (max-width: 480px) { .tb-wrap { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 2px; } }
.tb-grid { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; aspect-ratio: 1; background: #c9dceb; padding: 3px; border-radius: 14px; }
.tb-c { position: relative; border: 0; padding: 0; background: #f4f9fd; border-radius: 8px; cursor: pointer; overflow: hidden; }
.tb-c:hover { background: #fff; }
.tb-c.filt { background: #fff3d1; }
.tb-in { position: absolute; inset: 0; transition: transform .18s ease; }
.tb-in svg { width: 100%; height: 100%; display: block; }
.tb-pipe { fill: none; stroke: #8fa3b5; stroke-width: 26; stroke-linecap: butt; }
.tb-flow { fill: none; stroke: transparent; stroke-width: 12; }
.tb-joint { fill: #8fa3b5; }
.tb-c.wet .tb-pipe, .tb-c.wet .tb-joint { stroke: #6aa7d8; fill: #6aa7d8; }
.tb-c.wet .tb-flow { stroke: #bfe6ff; stroke-dasharray: 10 12; animation: tb-flow .8s linear infinite; }
@keyframes tb-flow { to { stroke-dashoffset: -44; } }
.tb-f { position: absolute; right: 4%; top: 4%; font-size: clamp(14px, 3vw, 22px); line-height: 1; pointer-events: none; }
.tb-src, .tb-dst { position: relative; }
.tb-src > *, .tb-dst > * { pointer-events: none; }
.tb-src span, .tb-dst span { position: absolute; left: 50%; top: calc((var(--row) + .5) / var(--n) * 100%); transform: translate(-50%, -60%); font-size: clamp(26px, 6vw, 42px); }
.tb-src small, .tb-dst small { position: absolute; left: 50%; top: calc((var(--row) + .5) / var(--n) * 100%); transform: translate(-50%, 70%); font-size: 11px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.tb.won .tb-dst span { animation: lg-bump .6s ease 2; }
.tb.won .tb-grid { box-shadow: 0 0 0 4px var(--leaf); }

/* Раскраски */
.rk-pics { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; }
.rk-pic { flex: none; width: 112px; display: grid; gap: 4px; justify-items: center; padding: 6px; border-radius: 14px; border: 2px solid var(--line); background: #fff;
  font: 700 13px/1.15 var(--text); color: var(--ink); cursor: pointer; }
.rk-pic svg { width: 96px; height: 96px; }
.rk-pic svg .f, .rk-pic svg .l { fill: #fff; stroke: #1d3a55; stroke-width: 8; }
.rk-pic svg .l { fill: none; }
.rk-pic[aria-pressed="true"] { border-color: var(--water); box-shadow: 0 0 0 3px var(--sky); }
.rk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .rk-grid { grid-template-columns: 1fr; } }
.rk-canvas { border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--line); background: #fff; max-width: 620px; }
#rk-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
#rk-svg .f:not([fill]) { fill: #fff; }
#rk-svg .f { stroke: #1d3a55; stroke-width: 4; stroke-linejoin: round; cursor: pointer; transition: fill .15s ease; }
#rk-svg .f.pop { animation: rk-pop .3s ease; transform-box: fill-box; transform-origin: center; }
@keyframes rk-pop { 50% { opacity: .6; } }
#rk-svg .l { fill: none; stroke: #1d3a55; stroke-width: 4; stroke-linecap: round; pointer-events: none; }
.rk-pal { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.rk-c { aspect-ratio: 1; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.rk-c[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.12); }
.rk-acts { display: grid; gap: 8px; margin-top: 14px; }
.rk-acts .btn { justify-content: center; padding: 12px 16px; font-size: 16px; }
.rk-printout { display: none; }
@media print {
  .rk-printout { display: block !important; text-align: center; }
  .rk-printout svg { width: 170mm; height: 170mm; }
  .rk-printout h2 { font-size: 28px; margin: 0 0 8mm; }
  .rk-printout p { font-size: 12px; color: #4a6177; }
}

/* Полёт капли */
.pl { padding: 16px; }
.pl-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-weight: 800; font-size: 18px; margin-bottom: 10px; }
.pl-top .chip { margin-left: auto; }
.pl-box { position: relative; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
#pl-cv { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; touch-action: none; cursor: pointer; outline: none; }
.pl-over { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px;
  background: rgba(238, 247, 253, .78); backdrop-filter: blur(3px); }
.pl-over[hidden] { display: none; }
.pl-over b { font-size: clamp(24px, 4vw, 38px); font-weight: 900; }
.pl-over p { margin: 0 0 6px; color: var(--ink-soft); font-weight: 700; max-width: 40ch; }
@media (max-width: 560px) { .pl-top { font-size: 16px; } #pl-cv { aspect-ratio: 4 / 3; } }

/* Нарисуй снежинку */
.sn { padding: 16px; }
.sn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .sn-grid { grid-template-columns: 1fr; } }
.sn-box { border-radius: 18px; overflow: hidden; max-width: 620px; box-shadow: 0 10px 26px rgba(19, 51, 90, .25); }
#sn-cv { display: block; width: 100%; height: auto; aspect-ratio: 1; touch-action: none; cursor: crosshair; }
.sn-lbl { font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--water-deep); margin: 0 0 6px; }
.sn-pal { grid-template-columns: repeat(8, minmax(0, 1fr)); margin-bottom: 14px; }
.sn-pal .rk-c { box-shadow: 0 0 0 2px #9cb4c8; }

/* Ловец капель */
.kp { padding: 16px; }
.kp-field { position: relative; height: min(70vh, 560px); border-radius: 18px; overflow: hidden; touch-action: manipulation;
  background: url(/img/igry/bg-kp.webp) center bottom / cover no-repeat, linear-gradient(180deg, #bfe3fb 0, #eef7fd 70%, #a5d68f 70%, #8cc275 100%);
  box-shadow: inset 0 0 0 1px var(--line); }
.kp-field.oops { animation: og-no .4s ease; }
.kp-cloud { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); font-size: clamp(90px, 20vw, 160px); line-height: 1; opacity: .95; pointer-events: none; }
.kp-cloud img { display: block; width: clamp(170px, 36vw, 300px); height: auto; }
.kp-bucket { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); font-size: clamp(56px, 12vw, 84px); line-height: 1; pointer-events: none; }
.kp-bucket img { display: block; width: clamp(70px, 14vw, 104px); height: auto; filter: drop-shadow(0 6px 6px rgba(40, 60, 40, .2)); }
.kp-bucket.yum { animation: lg-bump .4s ease; }
.kp-drop { position: absolute; top: 0; width: 64px; height: 64px; margin-left: -6px; border: 0; padding: 0; background: none; cursor: pointer;
  font-size: 46px; line-height: 64px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); }
.kp-drop.dirty:not(:has(img)) { filter: sepia(1) saturate(4) hue-rotate(-25deg) brightness(.62) drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); }
.kp-drop img { display: block; height: 56px; width: auto; margin: 4px auto 0; pointer-events: none; -webkit-user-drag: none; }
.kp-drop.caught { transition: transform .45s ease-in, opacity .45s ease-in; transform: translate(var(--dx), var(--dy)) scale(.4) !important; opacity: 0; translate: 0; }
.kp-drop.splat { transition: transform .3s ease, opacity .3s ease; opacity: 0; scale: 1.8; }

/* Сколько литров? */
.lt { padding: 20px; max-width: 820px; margin: 0 auto; }
.lt-top { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink-soft); }
.lt-q { font-size: clamp(22px, 3vw, 30px); margin: 10px 0 6px; }
.lt-val { font-size: clamp(40px, 7vw, 64px); font-weight: 900; color: var(--water-deep); text-align: center; line-height: 1.1; }
#lt-range { width: 100%; height: 34px; accent-color: var(--water); margin: 6px 0 0; }
.lt-scale { position: relative; height: 20px; margin: 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.lt-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.lt-scale span:first-child { transform: none; }
.lt-buckets { min-height: 64px; margin: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 5px; align-items: flex-end; }
.lt-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: flex-end; width: 100%; padding: 8px 10px; border-radius: 14px; background: var(--sky-2); }
.lt-row + .lt-row { background: var(--leaf-soft); margin-top: 6px; }
.lt-row small { width: 100%; font-weight: 800; color: var(--ink-soft); }
.lt-b { --f: 1; width: 22px; height: 26px; display: inline-block; border: 2.5px solid #5a7891; border-top-width: 1px; border-radius: 3px 3px 7px 7px;
  background: linear-gradient(to top, #4aa6e6 calc(var(--f) * 100%), #fff calc(var(--f) * 100%)); }
.lt-b.a { background: linear-gradient(to top, #5fae5a calc(var(--f) * 100%), #fff calc(var(--f) * 100%)); border-color: #3f7a3b; }
.lt-glass { font-size: 22px; font-weight: 900; }
.gu-pic { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 714; object-fit: contain; background: #fff; }
.gu-pic[hidden] { display: none; }

/* Правда или нет? */
.pr { padding: 20px; max-width: 760px; margin: 0 auto; }
.pr-card { margin: 14px 0; min-height: 190px; display: grid; place-items: center; text-align: center; padding: 22px; border-radius: 24px;
  background: linear-gradient(160deg, #fff, var(--sky-2)); border: 3px solid var(--sky); transition: background .3s ease, border-color .3s ease; }
.pr-card.in { animation: pr-in .4s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes pr-in { from { transform: scale(.85) rotate(-3deg); opacity: 0; } }
.pr-card.good { background: linear-gradient(160deg, #fff, var(--leaf-soft)); border-color: var(--leaf); }
.pr-card.bad { background: linear-gradient(160deg, #fff, var(--coral-soft)); border-color: var(--coral); animation: og-no .4s ease; }
.pr-e { font-size: 54px; line-height: 1; }
.pr-card p { margin: 10px 0 0; font-size: clamp(21px, 3vw, 28px); font-weight: 900; line-height: 1.25; }
.pr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pr-b { padding: 18px 10px; border-radius: 18px; border: 3px solid; font: 900 clamp(18px, 2.4vw, 22px) var(--text); cursor: pointer; transition: transform .12s ease; }
.pr-b.yes { background: var(--leaf-soft); border-color: var(--leaf); color: #2f6a2d; }
.pr-b.no { background: var(--coral-soft); border-color: var(--coral); color: #a8483a; }
.pr-b:hover:not(:disabled) { transform: translateY(-2px); }
.pr-b:disabled { opacity: .55; cursor: default; }
.pr-b.right, .pr-b.wrong { opacity: 1; box-shadow: 0 0 0 4px var(--sun); }
.pr .vbtn { vertical-align: middle; margin: 0 0 0 6px; }
/* озвучка реплик игр (gamevoice.js): у вопроса и слов клиента — отдельной строкой, в пояснениях — в строку */
#lt-q > .vbtn, .lg-client p > .vbtn { display: flex; width: fit-content; font-size: 13px; }
#lt-say .vbtn, #pt-say .vbtn, #og-say .vbtn { vertical-align: middle; margin: 0 0 0 6px; }
.pr-card .vbtn { font-size: 14px; }
.pr .vbtn.on { background: var(--water); color: #fff; border-color: var(--water); }
.tn .vbtn { margin: 0 0 0 6px; vertical-align: middle; } .tn .vbtn.on { background: var(--water); color: #fff; border-color: var(--water); }

/* «Музыкальные стаканы» */
.st { padding: clamp(14px, 3vw, 26px); }
.st-modes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.st-stage { position: relative; padding: 38px clamp(8px, 2.4vw, 26px) 0; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #e8f4ff 60%, #dcecfb 100%); }
.st-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: clamp(3px, 1.5vw, 16px);
  align-items: end; max-width: calc(var(--n, 8) * 88px); margin: 0 auto; }
.st-g { position: relative; display: grid; justify-items: center; gap: 4px; padding: 0 0 6px; border: 0; background: none; cursor: pointer; font: inherit;
  color: var(--ink); touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.st-g[hidden] { display: none; }
.st-g svg { width: 100%; max-width: 74px; height: auto; overflow: visible; transform-origin: 50% 100%; }
.st-g:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; border-radius: 10px; }
.st-g .note { min-height: 1.2em; font-size: clamp(11px, 2.7vw, 15px); font-weight: 800; color: var(--c); }
.st-g.ring svg { animation: st-ring .45s ease; }
@keyframes st-ring { 20% { transform: rotate(-3.5deg) } 45% { transform: rotate(2.5deg) } 70% { transform: rotate(-1.2deg) } }
.st-g.lit .glass { stroke: var(--c); stroke-width: 4; }
.st-g.lit svg { filter: drop-shadow(0 0 10px var(--c)); }
.st-g.miss svg { animation: st-miss .4s ease; }
@keyframes st-miss { 25% { transform: translateX(-4px) } 50% { transform: translateX(4px) } 75% { transform: translateX(-2px) } }
.st-lvl { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.st-g.drag .st-lvl { transition: transform .12s ease-out; }
.st-wave { animation: st-wave 2.6s linear infinite; }
@keyframes st-wave { from { transform: translateX(-24px) } to { transform: translateX(0) } }
.st-fly { position: absolute; left: 50%; top: 4%; font-size: clamp(16px, 4vw, 24px); font-weight: 800; color: var(--c); pointer-events: none; animation: st-fly .9s ease-out forwards; }
@keyframes st-fly { from { transform: translate(-50%, 0) scale(.6); opacity: 1 } to { transform: translate(-20%, -56px) scale(1.25); opacity: 0 } }
.st-shelf { position: relative; height: 18px; margin: 0 calc(-1 * clamp(8px, 2.4vw, 26px)); background: linear-gradient(#cf9762, #a8703f);
  border-top: 3px solid #e2b789; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); }
.st-drop { position: absolute; z-index: 2; top: 0; width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--c);
  pointer-events: none; animation: st-drop .48s ease-in forwards; }
@keyframes st-drop { from { transform: translateY(-20px); opacity: .3 } to { transform: translateY(var(--to)); opacity: 1 } }
.st.tune .st-g { touch-action: none; cursor: ns-resize; }
.st.tune .st-g::after { content: "↕"; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-size: 15px; font-weight: 800; color: var(--muted, #6b7f93); opacity: .55; }
.st.tune .st-g.hint::after { opacity: 1; color: var(--water); animation: st-hint 1.1s ease-in-out infinite; }
@keyframes st-hint { 50% { transform: translate(-50%, -6px) } }
.st-wait .st-g { cursor: wait; }
.st-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; min-height: 52px; margin: 16px 0 6px; }
.st-info { font-weight: 700; }
.st-lost { opacity: .22; filter: grayscale(1); }
.st-keys { margin: 10px 0 0; text-align: center; font-size: 14px; }
@media (hover: none) { .st-keys { display: none; } }
@media (prefers-reduced-motion: reduce) { .st-wave, .st-g.ring svg, .st-fly, .st.tune .st-g.hint::after { animation: none; } }

/* «Ночной пруд» */
.pd { padding: clamp(14px, 3vw, 26px); }
.pd-top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 700; }
.pd-modes { display: flex; gap: 8px; }
.pd-scene { position: relative; isolation: isolate; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: #174d78;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; --x: 50%; --y: 55%; --r: 90px; }
.pd.day .pd-scene, .pd.done .pd-scene { touch-action: manipulation; cursor: default; }
.pd-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.pd-c img { display: block; width: calc(clamp(30px, 6.2vw, 66px) * var(--s, 1)); height: calc(clamp(30px, 6.2vw, 66px) * var(--s, 1)); object-fit: contain; pointer-events: none; }
.pd-s img { display: block; width: 30px; height: 30px; object-fit: contain; }
.pd-big:has(img) { flex: none; }
.pd-big img { display: block; width: clamp(48px, 10vw, 66px); height: clamp(48px, 10vw, 66px); object-fit: contain; }
.pd-life { position: absolute; inset: 0; }
.pd-c { position: absolute; z-index: 1; transform: translate(-50%, -50%); padding: 6px; border: 0; background: none; cursor: pointer; line-height: 1;
  font-size: calc(clamp(20px, 4.4vw, 46px) * var(--s, 1)); -webkit-tap-highlight-color: transparent; }
.pd-c span { display: block; animation: pd-bob 3.2s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * -1); }
@keyframes pd-bob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.pd-c.found { z-index: 3; }
.pd-c.found span { filter: drop-shadow(0 0 7px rgba(255, 244, 170, .95)); }
.pd-c.found::after { content: "✓"; position: absolute; right: -2px; top: -2px; width: 18px; height: 18px; border-radius: 50%; background: #5fb357; color: #fff;
  font: 800 11px/18px var(--text); text-align: center; }
.pd-c:focus-visible { outline: 3px solid #ffd54a; border-radius: 12px; }
.pd-dark { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: rgba(3, 14, 34, .93); transition: opacity .7s;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), transparent 0, transparent 55%, #000 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), transparent 0, transparent 55%, #000 100%); }
.pd-glow { position: absolute; z-index: 2; left: var(--x); top: var(--y); width: calc(var(--r) * 2); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; background: radial-gradient(rgba(255, 238, 170, .22), transparent 68%); transition: opacity .7s; }
.pd-sky { position: absolute; inset: 0; z-index: 4; pointer-events: none; transition: opacity .7s; }
.pd-moon { position: absolute; left: 68%; top: 3%; font-size: clamp(22px, 4vw, 40px); filter: drop-shadow(0 0 14px #fff6c8); }
.pd-sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: pd-tw 2.4s ease-in-out infinite; }
@keyframes pd-tw { 50% { opacity: .25; } }
.pd.day .pd-dark, .pd.day .pd-glow, .pd.day .pd-sky, .pd.done .pd-dark, .pd.done .pd-glow, .pd.done .pd-sky { opacity: 0; }
.pd-bubbles i { position: absolute; bottom: 8%; width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75); animation: pd-up 6.5s linear infinite; }
@keyframes pd-up { 0% { bottom: 8%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: .8; } 100% { bottom: 64%; opacity: 0; } }
.pd-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 6px; }
.pd-s { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 2px dashed #cfdbe7; background: #eef4fa; color: #9db3c8;
  font: 800 18px var(--text); }
.pd-s.got { border: 2px solid var(--water); background: #fff; font-size: 24px; cursor: pointer; transition: transform .15s; }
.pd-s.got:hover { transform: translateY(-2px); }
#pd-card { margin-top: 8px; min-height: 80px; }
.pd-hint { text-align: center; }
.pd-fact { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: #f3f9ff; }
.pd-fact.new { animation: pd-pop .4s ease; }
@keyframes pd-pop { from { transform: scale(.94); opacity: .4; } }
.pd-big { font-size: clamp(40px, 9vw, 56px); line-height: 1; }
.pd-fact h3 { margin: 0 0 4px; }
.pd-fact h3 small { padding: 2px 8px; border-radius: 99px; background: #5fb357; color: #fff; font-size: 13px; vertical-align: middle; }
.pd-fact p { margin: 0; }
.pd-fact p .vbtn, .pd-hint .vbtn { display: flex; width: fit-content; }
.pd-hint .vbtn { margin: 8px auto 0; }
@media (max-width: 600px) { .pd-scene { aspect-ratio: 4 / 3.3; } .pd-s { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .pd-c span, .pd-bubbles i, .pd-sky i { animation: none; } }

/* «Подземный лабиринт» */
.lz { padding: clamp(14px, 3vw, 26px); }
.lz-top { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center; font-weight: 700; }
.lz-mins { display: flex; gap: 6px; }
.lz-chip { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed #c9d6e2; color: #a6b6c5;
  font: 800 13px var(--text); transition: .25s; }
.lz-chip.on { border: 2px solid #fff; background: #fff4c9; color: #33414d; box-shadow: 0 0 0 2px #e9b820; transform: scale(1.08); }
.lz-dots { display: flex; gap: 6px; justify-content: center; margin: 12px 0 14px; }
.lz-dot { position: relative; width: 38px; height: 38px; border-radius: 12px; border: 3px solid transparent; background: var(--c); color: #24313c;
  font: 800 15px var(--text); cursor: pointer; transition: transform .15s; }
.lz-dot + .lz-dot::before { content: ""; position: absolute; left: -9px; top: 50%; width: 6px; height: 2px; background: #c9d6e2; }
.lz-dot.cur { border-color: var(--ink); transform: scale(1.12); }
.lz-dot.done::after { content: "✓"; position: absolute; right: -6px; top: -7px; width: 16px; height: 16px; border-radius: 50%; background: #5fb357; color: #fff;
  font-size: 10px; line-height: 16px; }
.lz-dot:disabled { opacity: .35; cursor: not-allowed; }
.lz-box { position: relative; max-width: 560px; margin: 0 auto; padding-top: 6px; }
.lz-rain { position: absolute; left: -2px; top: -22px; font-size: 26px; animation: pd-bob 3s ease-in-out infinite; }
#lz-maze { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; touch-action: none; cursor: pointer;
  box-shadow: 0 10px 26px rgba(40, 60, 80, .18); user-select: none; -webkit-user-select: none; }
.lz-me { transition: transform .075s linear; }
.lz-me.bump image { animation: lz-bump .25s ease; transform-box: fill-box; transform-origin: center; }
@keyframes lz-bump { 30% { transform: scale(.82); } 60% { transform: scale(1.08); } }
.lz-ping { transform-box: fill-box; transform-origin: center; animation: lz-ping 1.5s ease-out infinite; }
@keyframes lz-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
.lz-m { transition: opacity .35s; }
.lz-m.taken { opacity: 0; }
.lz-toast { position: absolute; left: 50%; top: 14px; z-index: 2; width: max-content; max-width: 92%; padding: 8px 14px; border-radius: 16px; font-size: clamp(13px, 3.4vw, 16px); background: #fff; color: var(--ink);
  font-weight: 800; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); opacity: 0; transform: translate(-50%, -8px); transition: .25s; pointer-events: none; }
.lz-toast.on { opacity: 1; transform: translate(-50%, 0); }
.lz.won #lz-maze { animation: lz-won .9s ease; }
@keyframes lz-won { 40% { box-shadow: 0 0 0 8px rgba(47, 143, 224, .35), 0 10px 26px rgba(40, 60, 80, .18); } }
.lz-pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-areas: ". u ." "l d r"; gap: 6px; justify-content: center; margin: 14px 0 4px; }
.lz-pad button { height: 50px; border: 0; border-radius: 14px; background: var(--sky, #e3f1fc); color: var(--water-deep, #1d6fb8); font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 0 #c6dcee; touch-action: manipulation; }
.lz-pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 #c6dcee; }
.lz-pad .u { grid-area: u; } .lz-pad .l { grid-area: l; } .lz-pad .d { grid-area: d; } .lz-pad .r { grid-area: r; }
.lz-help { text-align: center; margin: 8px 0 0; }
.lz-res { margin: 12px 0 6px; text-align: center; font-weight: 800; font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .lz-ping, .lz-rain { animation: none; } .lz-me { transition: none; } }

/* «Лёд, вода и пар» */
.ss { padding: clamp(14px, 3vw, 26px); }
.ss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 3vw, 30px); align-items: center; }
.ss-scene { display: block; width: 100%; max-width: 340px; margin: 0 auto; overflow: visible; }
.ss-read { margin: 6px 0 10px; text-align: center; font-weight: 700; }
.ss-read b { display: block; font: 800 clamp(30px, 6vw, 42px)/1.1 var(--display, var(--text)); color: var(--ink); font-variant-numeric: tabular-nums; }
.ss-btns { display: flex; gap: 10px; justify-content: center; }
.ss-b { flex: 1; max-width: 170px; padding: 14px 10px; border-radius: 16px; border: 3px solid transparent; font: 800 16px var(--text); cursor: pointer;
  touch-action: manipulation; transition: transform .12s, box-shadow .12s; }
.ss-b.cold { background: #e1f1fd; color: #1d6fb8; box-shadow: 0 5px 0 #b9d8f0; }
.ss-b.hot { background: #ffe9d6; color: #c0561b; box-shadow: 0 5px 0 #f4c9a6; }
.ss-b[aria-pressed="true"] { transform: translateY(4px); box-shadow: 0 1px 0 transparent; border-color: currentColor; }
.ss-b.hot[aria-pressed="true"] { animation: ss-glow 1.2s ease-in-out infinite; }
@keyframes ss-glow { 50% { background: #ffd9b8; } }
.ss-fire { opacity: 0; transition: opacity .3s; transform-box: fill-box; transform-origin: 50% 100%; }
.ss.hot .ss-fire { opacity: 1; animation: ss-flick .35s ease-in-out infinite alternate; }
@keyframes ss-flick { from { transform: scaleY(.9) scaleX(1.04); } to { transform: scaleY(1.08) scaleX(.96); } }
.ss-frost { opacity: 0; fill: #6fb6e8; transition: opacity .3s; }
.ss.cold .ss-frost { opacity: 1; animation: pd-tw 1.6s ease-in-out infinite; }
.ss-wisps { opacity: 0; transition: opacity .6s; }
.ss-wisps path { animation: ss-rise 2.4s ease-in-out infinite; }
.ss-wisps path:nth-child(2) { animation-delay: -.8s; } .ss-wisps path:nth-child(3) { animation-delay: -1.6s; }
@keyframes ss-rise { from { transform: translateY(6px); opacity: .2; } 50% { opacity: 1; } to { transform: translateY(-10px); opacity: 0; } }
.ss-bub { opacity: 0; transition: opacity .4s; }
.ss.boiling .ss-bub { opacity: 1; }
.ss-bub circle { animation: ss-bub 1.1s linear infinite; }
@keyframes ss-bub { from { transform: translateY(0); } to { transform: translateY(-130px); } }
#ss-cube { transition: opacity .4s; }
#ss-col, #ss-water { transition: y .15s linear, height .15s linear; }
.ss-lensbox { text-align: center; }
.ss-cap { margin: 0 0 8px; font-weight: 800; }
.ss-lens { width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; border: 10px solid #fff;
  box-shadow: 0 0 0 4px #9cc3e0, 0 14px 30px rgba(40, 70, 100, .2); }
.ss-lens canvas { display: block; width: 100%; height: 100%; }
.ss-legend { margin: 10px 0 0; font-size: 14px; color: var(--muted, #5b6f82); }
.ss-legend span { display: inline-block; width: 14px; height: 14px; margin: 0 4px -2px 8px; border-radius: 50%; }
.ss-legend .o { background: #e5534b; } .ss-legend .h { background: #fff; border: 1px solid #9aa9b6; }
.ss-tasks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 18px 0 6px; padding: 0; list-style: none; }
.ss-tasks li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #f3f9ff; font-weight: 700; transition: background .3s; }
.ss-tasks li span { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9d6e2; color: #fff; font-size: 14px; }
.ss-tasks li.ok { background: #e6f5e3; }
.ss-tasks li.ok span { background: #5fb357; border-color: #5fb357; }
@media (max-width: 720px) { .ss-grid { grid-template-columns: 1fr; } .ss-lens { width: min(100%, 280px); } }
@media (max-width: 480px) { .ss-tasks { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ss.hot .ss-fire, .ss-wisps path, .ss-bub circle, .ss.cold .ss-frost { animation: none; } }

/* «Погодная лаборатория» */
.wx { padding: clamp(14px, 3vw, 26px); }
.wx-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(14px, 2.6vw, 26px); align-items: center; }
.wx-sky { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 20px; background: #9fd4f5; box-shadow: 0 10px 26px rgba(40, 70, 100, .16); }
.wx-ctrl { display: grid; gap: 16px; }
.wx-row { display: grid; gap: 4px; }
.wx-lab { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.wx-lab b { color: var(--water-deep, #1d6fb8); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wx-range { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.wx-range::-webkit-slider-runnable-track { height: 14px; border-radius: 99px; background: var(--track); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12); }
.wx-range::-moz-range-track { height: 14px; border-radius: 99px; background: var(--track); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12); }
.wx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -9px; border-radius: 50%; background: #fff; border: 5px solid var(--thumb);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .22); }
.wx-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 5px solid var(--thumb); box-shadow: 0 3px 8px rgba(0, 0, 0, .22); }
.wx-range:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; border-radius: 99px; }
#wx-t { --track: linear-gradient(90deg, #3d8fe0, #9fd4f5 38%, #ffe08a 62%, #f39a3d 82%, #e5534b); --thumb: #f08a3c; }
#wx-h { --track: linear-gradient(90deg, #f5ecd6, #b9def4 50%, #3d7ab8); --thumb: #3d8fe0; }
#wx-w { --track: linear-gradient(90deg, #e3f2e1, #9ccfa8 50%, #4f8f6a); --thumb: #4f8f6a; }
.wx-tod { display: flex; gap: 8px; }
#wx-card { margin-top: 16px; min-height: 96px; }
.wx-now { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: #f3f9ff; }
.wx-now.new { animation: pd-pop .4s ease; }
.wx-big { font-size: clamp(40px, 9vw, 56px); line-height: 1; }
.wx-now h3 { margin: 0 0 4px; }
.wx-now h3 small { padding: 2px 8px; border-radius: 99px; background: #5fb357; color: #fff; font-size: 13px; vertical-align: middle; }
.wx-now p { margin: 0; }
.wx-now p .vbtn { display: flex; width: fit-content; }
#wx-card .say { margin-top: 12px; }
.wx-h { margin: 22px 0 10px; font-size: clamp(18px, 3vw, 22px); }
.wx-coll { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.wx-g { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 14px; border: 2px dashed #cfdbe7; background: #eef4fa; color: #9db3c8;
  font: 800 20px var(--text); }
.wx-g small { font-size: 12px; line-height: 1.2; text-align: center; }
.wx-g.got { border: 2px solid #cfe3f3; background: #fff; color: var(--ink); cursor: pointer; transition: transform .15s; }
.wx-g.got span { font-size: 28px; }
.wx-g.got:hover { transform: translateY(-2px); }
.wx-g.cur { border-color: var(--water); box-shadow: 0 0 0 3px rgba(47, 143, 224, .2); }
@media (max-width: 820px) { .wx-grid { grid-template-columns: 1fr; } .wx-sky { aspect-ratio: 4 / 3; } }
@media (max-width: 520px) { .wx-coll { grid-template-columns: repeat(4, 1fr); } }

/* «Можно в раковину?» — карточки-свайпы */
.rv { padding: clamp(14px, 3vw, 26px); overflow: hidden; }
.rv-stack { position: relative; height: clamp(260px, 52vw, 320px); max-width: 360px; margin: 14px auto 6px; }
.rv-card { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 22px; border-radius: 26px; text-align: center;
  background: linear-gradient(160deg, #fff, #eef7ff); border: 2px solid #d6e7f5; box-shadow: 0 14px 30px rgba(40, 70, 100, .16);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; --yes: 0; --no: 0; }
.rv-card.top { z-index: 2; animation: rv-in .3s ease; }
.rv-card.next { z-index: 1; transform: scale(.94) translateY(12px); opacity: .75; cursor: default; }
@keyframes rv-in { from { transform: scale(.94) translateY(12px); } }
.rv-card:active { cursor: grabbing; }
.rv-e { font-size: clamp(64px, 16vw, 92px); line-height: 1; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .12)); }
.rv-card b { font-size: clamp(19px, 4.6vw, 24px); line-height: 1.2; }
.rv-card small { color: var(--ink-soft, #5b6f82); font-size: 14px; }
.rv-yes, .rv-no { position: absolute; top: 18px; padding: 4px 12px; border: 4px solid; border-radius: 10px; font: 900 22px/1 var(--text); letter-spacing: .04em; pointer-events: none; }
.rv-yes { left: 16px; color: #3f9a4a; transform: rotate(-12deg); opacity: var(--yes); }
.rv-no { right: 16px; color: #d6453c; transform: rotate(12deg); opacity: var(--no); }
.rv-end { cursor: default; }
.rv-btns { display: flex; gap: 12px; justify-content: center; margin: 14px 0 6px; }
.rv-b { flex: 1; max-width: 170px; padding: 14px 10px; border-radius: 16px; border: 0; font: 800 17px var(--text); cursor: pointer; touch-action: manipulation; transition: transform .1s; }
.rv-b.no { background: #fde3e0; color: #b8392f; box-shadow: 0 5px 0 #f3bdb6; }
.rv-b.yes { background: #e1f3dd; color: #2f7d39; box-shadow: 0 5px 0 #bfe0b8; }
.rv-b:active { transform: translateY(4px); box-shadow: none; }
.rv.hit-good .rv-stack { animation: rv-good .5s ease; }
.rv.hit-bad .rv-stack { animation: st-miss .4s ease; }
@keyframes rv-good { 40% { transform: scale(1.03); } }
#rv-say { min-height: 90px; }
.rv-hint { text-align: center; }
.rv-res { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 14px 16px; border-radius: 18px; animation: pd-pop .35s ease; }
.rv-res.good { background: #e8f6e5; } .rv-res.bad { background: #fdeceb; }
.rv-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font: 900 18px var(--text); }
.rv-res.good .rv-mark { background: #5fb357; } .rv-res.bad .rv-mark { background: #e0665d; }
.rv-res p { margin: 4px 0 0; }
.rv-res p .vbtn { display: flex; width: fit-content; }
#rv-say .say { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .rv-card.top { animation: none; } }

/* «Мой аквариум» */
.aq { padding: clamp(14px, 3vw, 26px); }
.aq-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.aq-bars { flex: 1 1 320px; display: grid; gap: 8px; }
.aq-bar { --v: 50%; position: relative; display: flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; background: #eef4fa; overflow: hidden;
  font-weight: 800; font-size: 14px; }
.aq-bar i { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 99px; transition: width .3s, background .3s; }
.aq-bar span { position: relative; z-index: 1; }
.aq-bar.good i { background: linear-gradient(90deg, #a9dfa1, #6cc062); }
.aq-bar.mid i { background: linear-gradient(90deg, #ffe08a, #f2c531); }
.aq-bar.low i { background: linear-gradient(90deg, #f6b3ab, #e5655b); animation: aq-blink 1s ease-in-out infinite; }
@keyframes aq-blink { 50% { opacity: .55; } }
.aq-score { display: flex; gap: 12px; align-items: center; }
.aq-mood { font-size: 44px; line-height: 1; }
.aq-happy { --p: 0%; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; text-align: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(#5fb357 var(--p), #e3edf5 0); }
.aq-happy b { font-size: 15px; font-variant-numeric: tabular-nums; }
.aq-happy small { margin-top: -18px; font-size: 10px; line-height: 1.1; color: var(--ink-soft, #5b6f82); max-width: 64px; }
.aq-tank { display: block; width: 100%; max-width: 860px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 18px; border: 6px solid #cfe3f3; background: #7cc4ea; cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 10px 26px rgba(40, 70, 100, .16); }
.aq.siphon .aq-tank { animation: aq-flash .7s ease; }
.aq.fresh .aq-tank { animation: aq-flash .8s ease; }
@keyframes aq-flash { 40% { filter: brightness(1.18) saturate(1.2); } }
.aq-acts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 860px; margin: 14px auto 6px; }
.aq-b { padding: 12px 6px; border-radius: 14px; border: 2px solid #d6e7f5; background: #fff; color: var(--ink); font: 800 14px/1.2 var(--text); cursor: pointer;
  box-shadow: 0 4px 0 #d6e7f5; touch-action: manipulation; transition: transform .1s; }
.aq-b:active { transform: translateY(3px); box-shadow: 0 1px 0 #d6e7f5; }
.aq-b[aria-pressed="true"] { background: #e1f1fd; border-color: var(--water); box-shadow: 0 4px 0 #b9d8f0; }
.aq-b:disabled { opacity: .45; cursor: default; }
#aq-say .say { margin-top: 10px; }
@media (max-width: 860px) { .aq-acts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .aq-tank { aspect-ratio: 4 / 3; } .aq-acts { grid-template-columns: repeat(2, 1fr); } .aq-happy { width: 80px; height: 80px; } .aq-mood { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) { .aq-bar.low i { animation: none; } }

/* «Тайные цвета фломастера» */
.fm { padding: clamp(14px, 3vw, 26px); }
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 3vw, 28px); align-items: center; }
.fm-cv { display: block; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 1; border-radius: 20px; background: linear-gradient(#fdfdfb, #eef4f8); }
.fm-pick { display: grid; gap: 12px; }
.fm-slot { display: grid; grid-template-columns: 82px 1fr; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: #f3f9ff; }
.fm-slot > span { font-weight: 800; font-size: 14px; }
.fm-slot > b { grid-column: 2; font-size: 13px; color: var(--ink-soft, #5b6f82); }
.fm-pens { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-pen { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 2px #d6e2ec; color: #fff; font: 900 13px var(--text);
  cursor: pointer; touch-action: manipulation; transition: transform .12s; }
.fm-pen.on { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.12); }
.fm-pen:disabled { cursor: default; opacity: .6; }
.fm-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#fm-say { margin-top: 14px; }
#fm-say .say + .say { margin-top: 10px; }
.fm-coll { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.fm-c { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 2px dashed #cfdbe7; background: #eef4fa; color: #9db3c8; font: 800 13px var(--text); }
.fm-c i { width: 22px; height: 22px; border-radius: 50%; background: #c9d6e2; }
.fm-c.got { border: 2px solid #cfe3f3; background: #fff; color: var(--ink); cursor: pointer; }
.fm-c.got i { background: var(--c); }
.fm-c em { display: flex; gap: 3px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-soft, #5b6f82); text-align: center; }
.fm-c em u { width: 12px; height: 12px; border-radius: 50%; }
@media (max-width: 760px) { .fm-grid { grid-template-columns: 1fr; } .fm-coll { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .fm-slot { grid-template-columns: 1fr; } .fm-slot > b { grid-column: 1; } .fm-pen { width: 38px; height: 38px; } }

/* «Грузовой кораблик» */
.kb { padding: clamp(14px, 3vw, 26px); overflow: hidden; }
.kb-top { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-weight: 700; margin-bottom: 10px; }
.kb.warn-t .kb-tilt b { color: #d6453c; }
.kb-scene { display: block; width: 100%; max-width: 680px; margin: 0 auto; border-radius: 18px; overflow: hidden; }
#kb-ship { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.kb-anim { transform-box: fill-box; transform-origin: 50% 100%; }
.kb.tip .kb-anim { animation: kb-tip 1.5s ease; }
@keyframes kb-tip { 45% { transform: rotate(calc(var(--dir, 1) * 16deg)); } }
.kb.sink .kb-anim { animation: kb-sink 1.5s ease; }
@keyframes kb-sink { 45% { transform: translateY(12px); } }
.kb.sail #kb-move { animation: kb-sail 1.5s ease-in forwards; }
@keyframes kb-sail { to { transform: translateX(300px); } }
.kb-wave { animation: kb-wave 3s linear infinite; }
@keyframes kb-wave { from { transform: translateX(0); } to { transform: translateX(40px); } }
.kb-gauge { --p: 0%; position: relative; display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 12px auto 0; font-size: 13px; font-weight: 800; }
.kb-gauge i { position: relative; flex: 1; height: 14px; border-radius: 99px; background: linear-gradient(90deg, #6cc062 var(--p), #e3edf5 var(--p)); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1); }
.kb-gauge i::after { content: ""; position: absolute; right: -2px; top: -5px; width: 4px; height: 24px; border-radius: 2px; background: #e5453c; }
.kb.warn-w .kb-gauge i { background: #e5655b; }
.kb-gauge em { font-style: normal; color: #d6453c; font-size: 12px; }
.kb-lab { margin: 14px 0 6px; font-weight: 800; font-size: 15px; }
.kb-tray { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; min-height: 72px; padding: 10px; border-radius: 16px; background: #f0e6d8; }
.kb-box { width: 50px; height: var(--h, 40px); border-radius: 8px; border: 2px solid #5a3b22; background: var(--c); color: #33414d; font: 900 18px var(--text);
  cursor: pointer; touch-action: manipulation; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12); transition: transform .15s; }
.kb-box.sel { transform: translateY(-6px) scale(1.06); box-shadow: 0 0 0 3px var(--ink), inset 0 -5px 0 rgba(0, 0, 0, .12); }
.kb-deck { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px 10px 14px; border-radius: 12px 12px 40px 40px; background: #2f6f9f; }
.kb-deck::after { content: "середина"; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); color: #cfe3f3; font-size: 10px; font-weight: 800; }
.kb-deck::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 14px; width: 2px; background: rgba(255, 255, 255, .35); }
.kb-slot { position: relative; height: 54px; border-radius: 8px; border: 2px dashed rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); color: #33414d;
  font: 900 18px var(--text); cursor: pointer; touch-action: manipulation; }
.kb-slot:disabled { cursor: default; }
.kb-slot:not(:disabled):not(.full) { border-color: #ffe08a; background: rgba(255, 224, 138, .22); }
.kb-slot.full { border: 2px solid #5a3b22; background: var(--c); }
.kb-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 6px; }
#kb-say .cta { margin-top: 10px; }
@media (max-width: 480px) { .kb-slot { height: 46px; font-size: 16px; } .kb-box { width: 44px; } .kb-deck { gap: 3px; padding: 8px 6px 14px; } }
@media (prefers-reduced-motion: reduce) { .kb-wave { animation: none; } #kb-ship { transition: none; } }
.kb-lab, .kb-tray, .kb-deck { max-width: 680px; margin-left: auto; margin-right: auto; }

/* «Считалочка с Аквой» */
.sc { padding: clamp(14px, 3vw, 26px); }
.sc .lt-top { align-items: center; }
.sc-q { margin: 6px 0 10px; text-align: center; font-size: clamp(24px, 5vw, 34px); }
.sc-field { position: relative; height: clamp(250px, 44vw, 340px); border-radius: 22px; background: linear-gradient(180deg, #e6f5ff, #c9e8fb); overflow: hidden; }
.sc-start { position: absolute; inset: 0; display: grid; place-items: center; }
.sc-start .btn { font-size: 22px; padding: 16px 30px; }
.sc-it { position: absolute; width: clamp(52px, 13vw, 76px); height: clamp(52px, 13vw, 76px); border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55);
  font-size: clamp(32px, 8vw, 48px); line-height: 1; cursor: pointer; touch-action: manipulation; animation: sc-pop .35s ease backwards; animation-delay: var(--d, 0s);
  transition: transform .15s, background .2s; }
@keyframes sc-pop { from { transform: scale(0); } }
.sc-it:active { transform: scale(.9); }
.sc-it.on { background: #fff3c4; box-shadow: 0 0 0 3px #f2c531; }
.sc-it i { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e5534b; color: #fff;
  font: 900 15px/1 var(--text); font-style: normal; animation: sc-pop .25s ease; }
.sc-opts { display: flex; gap: 14px; justify-content: center; margin: 16px 0 6px; }
.sc-o { width: clamp(70px, 20vw, 96px); height: clamp(70px, 20vw, 96px); border-radius: 22px; border: 0; background: #fff; color: var(--ink); font: 900 clamp(32px, 8vw, 44px)/1 var(--text);
  box-shadow: 0 6px 0 #c9dced, 0 8px 18px rgba(40, 70, 100, .12); cursor: pointer; touch-action: manipulation; transition: transform .1s; }
.sc-o:active { transform: translateY(4px); box-shadow: 0 2px 0 #c9dced; }
.sc-o.right { background: #6cc062; color: #fff; box-shadow: 0 6px 0 #4c9a44; }
.sc-o.wrong { background: #f6c1bb; color: #b8392f; animation: st-miss .4s ease; }
.sc-say { min-height: 1.6em; margin: 6px 0 0; text-align: center; font-size: 18px; font-weight: 800; }
.sc.yay .sc-field { animation: rv-good .6s ease; }
.sc-end { position: absolute; inset: 0; display: grid; place-items: center; place-content: center; gap: 8px; text-align: center; }
.sc-end span { font-size: 72px; } .sc-end b { font-size: 24px; }
@media (prefers-reduced-motion: reduce) { .sc-it { animation: none; } }

/* «Кто где живёт?» */
.kg { padding: clamp(14px, 3vw, 26px); }
.kg .lt-top { align-items: center; }
.kg-tray { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 86px; padding: 12px; border-radius: 20px; background: #fff7e3; }
.kg-a { width: clamp(62px, 15vw, 78px); height: clamp(62px, 15vw, 78px); border-radius: 20px; border: 3px solid #f3dc9a; background: #fff; font-size: clamp(36px, 9vw, 46px); line-height: 1;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .15s, opacity .2s; }
.kg-a.sel { border-color: var(--water); transform: translateY(-4px) scale(1.06); box-shadow: 0 6px 14px rgba(47, 143, 224, .25); }
.kg-a.lift { opacity: .3; }
.kg-a.done { display: none; }
.kg-a.no { animation: st-miss .4s ease; border-color: #e5655b; }
.kg-a img { display: block; width: 82%; height: 82%; margin: auto; object-fit: contain; pointer-events: none; }
.kg-ghost img { display: block; width: 64px; height: 64px; object-fit: contain; }
.kg-p img { display: block; width: clamp(40px, 9vw, 54px); height: clamp(40px, 9vw, 54px); object-fit: contain; filter: drop-shadow(0 3px 3px rgba(30, 50, 60, .2)); }
.kg-ghost { position: fixed; z-index: 1000; font-size: 54px; line-height: 1; transform: translate(-50%, -60%) scale(1.1); pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .2)); }
.kg-homes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.kg .kg-home.both { display: none; }
.kg.three .kg-homes { grid-template-columns: repeat(3, 1fr); }
.kg.three .kg-home.both { display: flex; }
.kg-home { display: flex; flex-direction: column; gap: 8px; min-height: clamp(150px, 30vw, 220px); padding: 12px; border-radius: 22px; border: 3px dashed transparent; cursor: pointer;
  transition: transform .15s, border-color .15s; }
.kg-home b { font-size: clamp(15px, 3.4vw, 19px); text-align: center; }
.kg-home.water { background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .05)), url(/img/igry/bg-kg-water.webp) center bottom / cover, linear-gradient(180deg, #d6eefc, #8fcbef); }
.kg-home.land { background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .05)), url(/img/igry/bg-kg-land.webp) center bottom / cover, linear-gradient(180deg, #eaf6e2, #a9d88f); }
.kg-home.both { background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .05)), url(/img/igry/bg-kg-both.webp) center / cover, linear-gradient(90deg, #a9daf5 0 50%, #bfe3a6 50% 100%); }
.kg-home.hover, .kg-home:focus-visible { border-color: var(--ink); transform: scale(1.02); outline: none; }
.kg-in { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-content: flex-start; flex: 1; }
.kg-p { font-size: clamp(30px, 7vw, 40px); line-height: 1; animation: sc-pop .3s ease; }
.kg-say { min-height: 2.6em; margin: 12px 0 0; text-align: center; font-size: 17px; font-weight: 800; }
@media (max-width: 520px) { .kg.three .kg-homes { grid-template-columns: 1fr 1fr; } .kg.three .kg-home.both { grid-column: 1 / -1; order: 3; min-height: 110px; } }

/* «Сила воды» — ГЭС */
.ge { padding: clamp(14px, 3vw, 26px); --night: 0; }
.ge-top { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; margin-bottom: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ge-fishc { opacity: .35; } .ge.fish .ge-fishc { opacity: 1; }
.ge-scene { display: block; width: 100%; max-width: 760px; margin: 0 auto; border-radius: 18px; overflow: hidden; }
.ge-stars, .ge-moon { opacity: var(--night); }
.ge-nightsky { opacity: calc(var(--night) * .78); }                 /* нарисованный пейзаж темнеет, но остаётся виден */
.ge-house .w { fill: rgba(255, 213, 74, 0); transition: fill .3s; }  /* окно нарисовано на домике; рамка — только когда горит или ждут свет */
.ge-house.on .w { fill: #ffd54a; filter: drop-shadow(0 0 4px #ffe58a); }
.ge-house.want:not(.on) .w { fill: rgba(12, 16, 24, .55); }
#ge-jet { transition: opacity .3s; stroke-dasharray: 10 6; animation: ge-flow .5s linear infinite; }
@keyframes ge-flow { to { stroke-dashoffset: -16; } }
#ge-spill { transition: opacity .4s; stroke-dasharray: 8 6; animation: ge-flow .6s linear infinite; }
#ge-water { transition: y .2s, height .2s; }
.ge-ladder { opacity: .25; transition: opacity .3s; }
.ge.fish .ge-ladder { opacity: 1; }
.ge-fishy { opacity: 0; }
.ge.fish .ge-fishy { animation: ge-fish 3s ease-in-out infinite; }
@keyframes ge-fish { 0% { opacity: 0; transform: translate(14px, 70px); } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(0, 0); } }
.ge-ctrl { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px 20px; align-items: end; max-width: 760px; margin: 14px auto 0; }
.ge-res { display: grid; gap: 6px; font-weight: 700; }
.ge-bar { --v: 50%; height: 16px; border-radius: 99px; background: linear-gradient(90deg, #3f93cf var(--v), #e3edf5 var(--v)); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12); }
.ge-bar.low { background: linear-gradient(90deg, #e5655b var(--v), #e3edf5 var(--v)); }
#ge-gate { --track: linear-gradient(90deg, #3f93cf var(--p, 30%), #dbe7f1 var(--p, 30%)); --thumb: #2f6f9f; }
.ge-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
#ge-say { margin-top: 12px; }
@media (max-width: 600px) { .ge-ctrl { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { #ge-jet, #ge-spill, .ge.fish .ge-fishy { animation: none; } }

/* «Радуга в стакане» */
.rg { padding: clamp(14px, 3vw, 26px); }
.rg-grid { display: grid; grid-template-columns: minmax(170px, 260px) 1fr; gap: clamp(16px, 4vw, 40px); align-items: center; }
.rg-glassbox { position: relative; display: grid; justify-items: center; padding-top: 30px; }
.rg-glass { position: relative; display: flex; flex-direction: column-reverse; width: clamp(110px, 26vw, 150px); height: clamp(230px, 46vw, 300px); overflow: hidden;
  border: 5px solid #cfe3f3; border-top: 0; border-radius: 0 0 26px 26px; background: linear-gradient(90deg, rgba(255, 255, 255, .5), rgba(230, 244, 255, .7));
  box-shadow: inset -10px 0 0 rgba(255, 255, 255, .45), 0 12px 26px rgba(40, 70, 100, .15); }
.rg-layer { flex: none; transform-origin: 50% 100%; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); }
.rg-layer.fresh { animation: rg-in .7s ease; }
.rg-layer.mixed.fresh { animation: rg-mix 1s ease; }
@keyframes rg-in { from { transform: scaleY(0); } }
@keyframes rg-mix { 0% { filter: saturate(2) blur(3px); } 100% { filter: none; } }
.rg-stream { position: absolute; top: 0; left: 50%; width: 10px; height: 0; margin-left: -5px; border-radius: 5px; background: var(--pc, #3d8fe0); transition: height .3s; z-index: 1; }
.rg.stream .rg-stream { height: calc(100% - 40px); animation: rg-pour .9s ease forwards; }
@keyframes rg-pour { 0% { height: 0; } 30%, 80% { height: calc(100% - 40px); opacity: 1; } 100% { opacity: 0; } }
.rg-count { margin: 10px 0 0; font-weight: 800; }
.rg.won .rg-glass { animation: rv-good .8s ease; box-shadow: 0 0 0 6px rgba(242, 197, 49, .35), 0 12px 26px rgba(40, 70, 100, .15); }
.rg-cups { display: flex; flex-wrap: wrap; gap: 12px; }
.rg-cup { position: relative; display: grid; justify-items: center; gap: 6px; width: 84px; padding: 0 0 6px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink);
  touch-action: manipulation; transition: transform .3s; }
.rg-cup .rg-liq { display: block; width: 58px; height: 64px; border: 4px solid #cfe3f3; border-top: 0; border-radius: 0 0 14px 14px;
  background: linear-gradient(to top, var(--c) 78%, transparent 78%); transition: background .6s; }
.rg-cup small { font-size: 12px; font-weight: 800; min-height: 2.4em; text-align: center; line-height: 1.2; }
.rg-cup.pouring { transform: translateY(-10px) rotate(-35deg); }
.rg-cup.empty .rg-liq { background: linear-gradient(to top, var(--c) 6%, transparent 6%); }
.rg-cup:disabled { cursor: default; }
.rg-cup:not(:disabled):hover { transform: translateY(-4px); }
#rg-say { margin-top: 14px; }
@media (max-width: 600px) { .rg-grid { grid-template-columns: 1fr; } .rg-cups { justify-content: center; } .rg-cup { width: 64px; } .rg-cup .rg-liq { width: 48px; height: 54px; } }
@media (prefers-reduced-motion: reduce) { .rg-layer.fresh { animation: none; } }

/* «Подводная лодка» */
.sb { padding: clamp(14px, 3vw, 26px); }
#sb-cv { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.sb-ctrl { display: grid; grid-template-columns: 1fr minmax(120px, 200px) 1fr; gap: 12px; align-items: center; margin: 14px 0 6px; }
.sb-b { display: grid; gap: 2px; padding: 14px 8px; border: 0; border-radius: 18px; font: 800 17px/1.15 var(--text); cursor: pointer; touch-action: none; user-select: none;
  -webkit-user-select: none; transition: transform .1s; }
.sb-b small { font-size: 12px; font-weight: 700; opacity: .8; }
.sb-b.up { background: #eef7ff; color: #1d6fb8; box-shadow: 0 5px 0 #c6dcee; }
.sb-b.down { background: #dbeefc; color: #12507f; box-shadow: 0 5px 0 #a9cbe6; }
.sb-b.on { transform: translateY(4px); box-shadow: none; filter: brightness(.96); }
.sb-tank { --b: 50%; display: grid; gap: 4px; text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-soft, #5b6f82); }
.sb-tank i { height: 16px; border-radius: 99px; background: linear-gradient(90deg, #3f93cf var(--b), #fff var(--b)); box-shadow: inset 0 0 0 2px #cfe3f3; }
#sb-say { margin-top: 10px; }
@media (max-width: 600px) { #sb-cv { aspect-ratio: 520 / 430; } .sb-ctrl { grid-template-columns: 1fr 1fr; } .sb-tank { grid-column: 1 / -1; order: -1; } .sb-b { font-size: 15px; padding: 16px 6px; } }

/* «Собери слово» */
.sw { padding: clamp(14px, 3vw, 26px); text-align: center; }
.sw .lt-top { align-items: center; text-align: left; }
.sw-e { font-size: clamp(64px, 16vw, 96px); line-height: 1.1; margin: 4px 0 10px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); }
.sw-slots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 64px; margin-bottom: 18px; }
.sw-slot { width: clamp(44px, 12vw, 60px); height: clamp(52px, 14vw, 68px); border-radius: 14px; border: 3px dashed #b8cfe2; background: #f3f9ff; color: var(--ink);
  font: 900 clamp(26px, 7vw, 36px)/1 var(--text); cursor: pointer; touch-action: manipulation; }
.sw-slot.on { border-style: solid; border-color: var(--water); background: #fff; animation: sc-pop .2s ease; }
.sw-slots.good .sw-slot { border-color: #5fb357; background: #e8f6e5; color: #2f7d39; animation: rv-good .5s ease; }
.sw-slots.bad .sw-slot { border-color: #e0665d; background: #fdeceb; animation: st-miss .4s ease; }
.sw-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sw-tile { width: clamp(48px, 13vw, 64px); height: clamp(52px, 14vw, 68px); border-radius: 14px; border: 0; background: #fff3c4; color: #5a3b22;
  font: 900 clamp(26px, 7vw, 36px)/1 var(--text); box-shadow: 0 5px 0 #e9c766; cursor: pointer; touch-action: manipulation; transition: transform .1s, opacity .2s; }
.sw-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 #e9c766; }
.sw-tile:disabled { opacity: .2; cursor: default; box-shadow: none; }
.sw-hint { margin: 8px 0 0; }
.sw-ok { margin: 10px auto 0; max-width: 46ch; font-size: 18px; font-weight: 800; color: #2f7d39; }
#sw-say .cta { margin-top: 12px; }

/* «Путешествие по Волге» */
.vg { padding: clamp(14px, 3vw, 26px); }
.vg-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(14px, 3vw, 30px); align-items: start; margin-top: 10px; }
.vg-map { display: block; width: 100%; height: auto; }
.vg-dot circle { fill: #fff; stroke: #2f7fbf; stroke-width: 3; }
.vg-dot text { font-size: 12px; font-weight: 800; fill: #4a5f73; paint-order: stroke; stroke: #eef6e4; stroke-width: 3px; }
.vg-dot.done circle { fill: #5fb357; stroke: #3f8a3a; }
.vg-dot.cur circle { fill: #ffd54a; stroke: #e3a21a; animation: vg-pulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes vg-pulse { 50% { transform: scale(1.35); } }
#vg-boat { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.vg-stop { padding: 16px; border-radius: 18px; background: #f3f9ff; animation: pd-pop .35s ease; }
.vg-stop h3 { margin: 0 0 6px; }
.vg-stop p { margin: 0 0 8px; }
.vg-stop p .vbtn { display: flex; width: fit-content; }
.vg-q { margin-top: 12px !important; }
.vg-opts { display: grid; gap: 8px; }
.vg-o { padding: 12px 14px; border-radius: 14px; border: 2px solid #cfe3f3; background: #fff; color: var(--ink); font: 700 16px var(--text); text-align: left; cursor: pointer;
  touch-action: manipulation; transition: transform .1s, background .2s; }
.vg-o:hover:not(:disabled) { transform: translateX(3px); border-color: var(--water); }
.vg-o.right { background: #e1f3dd; border-color: #5fb357; }
.vg-o.wrong { background: #fde3e0; border-color: #e0665d; animation: st-miss .4s ease; }
.vg-o.hint { border-color: #f2c531; box-shadow: 0 0 0 3px rgba(242, 197, 49, .35); }
.vg-o:disabled { cursor: default; }
#vg-card .say { margin-top: 12px; }
@media (max-width: 720px) { .vg-grid { grid-template-columns: 1fr; } .vg-map { max-width: 420px; margin: 0 auto; } }

/* «Очистные сооружения» */
.oc { padding: clamp(14px, 3vw, 26px); --w: #7a5a32; }
.oc-tray { display: flex; flex-wrap: wrap; gap: 8px; min-height: 58px; padding: 10px; border-radius: 16px; background: #f0e6d8; }
.oc-card { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 14px; border: 2px solid #d9c3a3; background: #fff; color: var(--ink);
  font: 800 15px var(--text); cursor: pointer; touch-action: manipulation; transition: transform .12s; }
.oc-card i { font-style: normal; font-size: 22px; }
.oc-card.sel { border-color: var(--water); transform: translateY(-3px); box-shadow: 0 6px 14px rgba(47, 143, 224, .25); }
.oc-line { position: relative; display: grid; grid-template-columns: 64px repeat(5, 1fr) 64px; gap: 10px; align-items: center; margin: 20px 0 6px; }
.oc-line::before { content: ""; position: absolute; left: 30px; right: 30px; top: 50%; height: 14px; margin-top: -7px; border-radius: 99px; background: var(--w);
  transition: background 1s; z-index: 0; }
.oc-slot { position: relative; z-index: 1; display: grid; place-items: center; gap: 2px; min-height: 92px; padding: 8px 4px; border-radius: 18px; border: 3px dashed #b8cfe2;
  background: #f7fbff; color: var(--ink); font: 800 13px/1.15 var(--text); cursor: pointer; touch-action: manipulation; transition: transform .2s, border-color .2s, background .2s; }
.oc-slot span { font-size: 22px; color: #a6b6c5; }
.oc-slot i { font-style: normal; font-size: 30px; }
.oc-slot.full { border-style: solid; border-color: #cfe3f3; background: #fff; }
.oc-slot.flow { transform: scale(1.06); border-color: var(--water); box-shadow: 0 0 0 5px rgba(47, 143, 224, .2); }
.oc-slot.ok { border-color: #5fb357; background: #e8f6e5; }
.oc-slot.err { border-color: #e0665d; background: #fdeceb; animation: st-miss .4s ease; }
.oc-end { position: relative; z-index: 1; display: grid; justify-items: center; font-size: 34px; line-height: 1; }
.oc-end small { font-size: 12px; font-weight: 800; color: var(--ink-soft, #5b6f82); margin-top: 4px; }
.oc-end.river b { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #c9b48a; font-size: 30px; transition: background 1s; }
.oc.clean .oc-end.river b { background: #8fd0f5; }
.oc-end.river em { position: absolute; top: 14px; font-style: normal; font-size: 22px; opacity: 0; transition: opacity .6s .6s; }
.oc.clean .oc-end.river em { opacity: 1; animation: pd-bob 2s ease-in-out infinite; }
#oc-say { margin-top: 10px; min-height: 90px; }
@media (max-width: 700px) {
  .oc-line { grid-template-columns: 1fr; gap: 8px; max-width: 320px; margin-left: auto; margin-right: auto; }
  .oc-line::before { left: 50%; right: auto; top: 30px; bottom: 30px; width: 14px; height: auto; margin: 0 0 0 -7px; }
  .oc-slot { min-height: 64px; grid-auto-flow: column; justify-content: center; gap: 10px; font-size: 15px; }
}

/* «Запотевшее окно» */
.ow { padding: clamp(14px, 3vw, 26px); }
.ow-frame { position: relative; aspect-ratio: 4 / 3; max-width: 760px; margin: 0 auto; border: clamp(12px, 3vw, 22px) solid #e9dcc6; border-radius: 14px;
  box-shadow: inset 0 0 0 3px #c9b28c, 0 14px 30px rgba(60, 50, 30, .18); overflow: hidden; background: #2e4363; }
.ow-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ow-fog { touch-action: none; cursor: crosshair; }
.ow-cross { position: absolute; background: #e9dcc6; box-shadow: 0 0 0 2px #c9b28c; pointer-events: none; }
.ow-cross.v { left: 50%; top: 0; bottom: 0; width: 10px; margin-left: -5px; }
.ow-cross.h { top: 50%; left: 0; right: 0; height: 10px; margin-top: -5px; }
.ow.puff .ow-frame { animation: ow-puff .7s ease; }
@keyframes ow-puff { 40% { filter: brightness(1.15) blur(1px); } }
.ow-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 4px; }
#ow-say { margin-top: 10px; }
@media (max-width: 560px) { .ow-frame { aspect-ratio: 3 / 4; } }
