/* Кнопоня — стили сайта. Свои, без внешних шрифтов и CDN. */
:root { --ink: #3d2f5b; --bg: #fff8e7; --card: #ffffff; --accent: #ff8a65; --font: "Nunito", "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); box-shadow: 0 4px 0 rgba(61,47,91,.18); cursor: pointer; padding: 10px; text-decoration: none; font: 800 18px var(--font); flex: none; }
.ibtn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(61,47,91,.18); }
.ibtn svg { width: 100%; height: 100%; }
.ibtn .cross { display: none; }
.ibtn.off .cross { display: inline; } .ibtn.off .wave { display: none; } .ibtn.off { opacity: .7; }

/* ---------- Главная ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; max-width: 1100px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo canvas { width: 64px; height: 64px; }
.logo b { font-size: 34px; letter-spacing: .5px; color: var(--accent); text-shadow: 0 3px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff; }
.badge0 { font-weight: 900; font-size: 15px; background: #6bcb77; color: #fff; border-radius: 12px; padding: 4px 8px; }
.hero { max-width: 1100px; margin: 0 auto; padding: 4px 18px 8px; font-size: 20px; font-weight: 700; opacity: .85; }
.grid { list-style: none; margin: 0 auto; padding: 10px 16px 24px; max-width: 1100px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: block; background: var(--card); border-radius: 28px; text-decoration: none; box-shadow: 0 8px 0 rgba(61,47,91,.12); overflow: hidden; border: 4px solid #fff; transition: transform .12s; }
.card:active { transform: scale(.97); }
@media (hover: hover) { .card:hover { transform: translateY(-4px) rotate(-.5deg); } }
.card canvas { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 22px 22px 0 0; }
.card .meta { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; }
.card h2 { margin: 0; font-size: 26px; line-height: 1.1; }
.card p { margin: 2px 0 0; font-size: 16px; opacity: .75; font-weight: 700; }
.card .play { margin-left: auto; width: 58px; height: 58px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 4px 0 #26a052; flex: none; position: relative; }
.card .play::after { content: ""; position: absolute; left: 22px; top: 16px; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.prog { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 900; color: #b07800; }
footer { max-width: 1100px; margin: 0 auto; padding: 10px 18px 40px; font-size: 15px; font-weight: 700; opacity: .8; display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { font-weight: 900; }

/* ---------- Страница игры ---------- */
body.game-page { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.gbar { flex: none; height: 72px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
.gtitle { margin: 0 auto; font-size: clamp(18px, 5.4vw, 26px); font-weight: 900; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#game { flex: 1; min-height: 0; position: relative; }
#game canvas { display: block; }
iframe.embed { flex: 1; width: 100%; border: 0; display: block; }

/* ---------- Текстовые страницы ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; font-size: 18px; line-height: 1.55; }
.doc h1 { font-size: 32px; } .doc h2 { font-size: 22px; margin-top: 28px; }
.btn { display: inline-block; font: 900 18px var(--font); background: #ff8a65; color: #fff; border: 0; border-radius: 16px; padding: 12px 20px; box-shadow: 0 4px 0 #d9643f; cursor: pointer; }
