/* template12 «Игровая комната» — детская тема сетки. Шрифты свои, без внешних запросов. */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('../fonts/unbounded-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('../fonts/unbounded-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('../fonts/nunito-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('../fonts/nunito-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #1f2a44;
  --ink-soft: #4b5570;
  --muted: #7a8299;
  --bg: #fff8ec;
  --card: #fff;
  --tomato: #ff6b57;
  --sun: #ffc93c;
  --grass: #3dbe8b;
  --sky: #4da8ff;
  --berry: #ff8fc7;
  --lilac: #a98bff;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 24px;
  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Nunito", "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 600 17px/1.6 var(--text); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- шапка ---------- */
.site-header { padding: 20px 0 6px; }
.bar {
  background-color: var(--card);
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255, 201, 60, .35) 0 5px, transparent 6px),
    radial-gradient(circle at 36% 78%, rgba(77, 168, 255, .28) 0 4px, transparent 5px),
    radial-gradient(circle at 58% 16%, rgba(255, 143, 199, .35) 0 5px, transparent 6px),
    radial-gradient(circle at 78% 70%, rgba(61, 190, 139, .30) 0 4px, transparent 5px),
    radial-gradient(circle at 92% 30%, rgba(169, 139, 255, .30) 0 5px, transparent 6px);
  border: 3px solid var(--ink); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden;
}
.bar-top { display: flex; align-items: center; gap: 20px; padding: 16px 18px 14px 20px; }
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo img { max-height: 72px; width: auto; display: block; }
.logo .blocks { display: flex; gap: 3px; flex: none; }
.logo .blocks i {
  width: 26px; height: 26px; border: 2.5px solid var(--ink); border-radius: 7px;
  display: grid; place-items: center; font: 900 13px var(--display); font-style: normal; color: #fff;
}
.logo .blocks i:nth-child(1) { background: var(--tomato); transform: rotate(-8deg); }
.logo .blocks i:nth-child(2) { background: var(--sun); color: var(--ink); transform: translateY(-4px); }
.logo .blocks i:nth-child(3) { background: var(--sky); transform: rotate(7deg); }
.brand { min-width: 0; }
.brand-name {
  display: inline-block; font: 900 clamp(24px, 3.2vw, 38px)/1.05 var(--display); letter-spacing: -1px;
  background: linear-gradient(90deg, #ff6b57 0%, #f59e0b 25%, #2fae7c 50%, #3b8fe6 75%, #8b6cf0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 2px 0 rgba(31, 42, 68, .18));
}
.brand .motto { margin-top: 6px; font: 800 16px/1.3 var(--text); color: var(--ink-soft); }
.brand .motto::before { content: "✦ "; color: var(--berry); }
.doodles { flex: 1; position: relative; height: 72px; min-width: 150px; }
.doodles svg { position: absolute; }
.d-sun { width: 50px; left: 8%; top: 4px; animation: t12-spin 18s linear infinite; }
.d-cloud { width: 78px; left: 34%; top: 14px; animation: t12-drift 6s ease-in-out infinite; }
.d-balloon { width: 30px; left: 66%; top: -2px; animation: t12-float 4.5s ease-in-out infinite; }
.d-star { width: 34px; right: 4%; top: 22px; animation: t12-wobble 3.8s ease-in-out infinite; }
@keyframes t12-drift { 50% { transform: translateX(10px); } }
@keyframes t12-float { 50% { transform: translateY(-7px) rotate(4deg); } }
.bar .home {
  flex: none; background: var(--grass); color: #fff; border: 3px solid var(--ink); border-radius: 999px;
  padding: 10px 20px; font: 800 15px var(--text); box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.bar .home:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.rubrics { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 18px 18px; border-top: 3px dashed rgba(31, 42, 68, .18); background: rgba(255, 248, 236, .75); }
.rubrics a {
  flex: none; font: 700 14px/1 var(--display); padding: 12px 18px; border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; white-space: nowrap;
}
.rubrics a:hover, .rubrics a.on { transform: translate(-2px, -3px) rotate(-2deg); box-shadow: 6px 7px 0 var(--ink); }
.rubrics a:nth-child(6n+1) { background: var(--tomato); color: #fff; }
.rubrics a:nth-child(6n+2) { background: var(--sun); }
.rubrics a:nth-child(6n+3) { background: var(--sky); color: #fff; }
.rubrics a:nth-child(6n+4) { background: var(--grass); color: #fff; }
.rubrics a:nth-child(6n+5) { background: var(--berry); }
.rubrics a:nth-child(6n+6) { background: var(--lilac); color: #fff; }

/* ---------- реклама ---------- */
.header-banner { width: 100%; max-width: 1200px; margin: 12px auto 0; padding: 0 20px; overflow: hidden; }
.header-banner-stage { width: 100%; display: flex; justify-content: center; overflow: hidden; }
.header-banner-slot { width: 728px; min-width: 728px; max-width: none; transform-origin: top center; }
.header-banner img, .header-banner iframe { max-width: 100%; height: auto; }
.ad-slot { display: flex; justify-content: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.ad-bottom { margin: 10px 0 46px; }

/* ---------- главное на странице ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; padding: 40px 0 16px; }
.badge {
  display: inline-flex; gap: 8px; align-items: center; background: var(--card); border: 3px solid var(--ink);
  border-radius: 999px; padding: 6px 14px; font: 800 14px var(--text); box-shadow: 3px 3px 0 var(--ink);
}
.hero-title { font: 900 clamp(28px, 3.6vw, 44px)/1.1 var(--display); letter-spacing: -1px; margin: 18px 0 16px; }
.hero-title a:hover { color: var(--tomato); }
.hero p { color: var(--ink-soft); font-size: 18px; margin: 0 0 24px; }
.hero .pic { position: relative; display: block; }
.hero .frame {
  display: block; border: 4px solid var(--ink); border-radius: 36px; overflow: hidden; aspect-ratio: 1 / 1;
  box-shadow: 12px 12px 0 var(--tomato); transform: rotate(2deg); transition: transform .5s; background: #ffe6c7;
}
.hero .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .pic:hover .frame { transform: rotate(-1deg) scale(1.02); }
.hero .sticker {
  position: absolute; width: 104px; height: 104px; left: -30px; bottom: 28px; background: var(--sun);
  border: 3.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; text-align: center;
  font: 900 15px/1.1 var(--display); transform: rotate(-14deg); animation: t12-wobble 4s ease-in-out infinite;
}
.hero .star { position: absolute; right: -16px; top: -20px; width: 70px; animation: t12-spin 14s linear infinite; }
@keyframes t12-wobble { 50% { transform: rotate(-4deg) scale(1.05); } }
@keyframes t12-spin { to { transform: rotate(360deg); } }
.btn {
  display: inline-block; background: var(--tomato); color: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: 13px 24px; font: 800 17px var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; cursor: pointer;
}
.btn:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.wave { display: block; width: 100%; height: 36px; margin: 26px 0 8px; }

/* ---------- лента и колонка ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding: 10px 0 40px; }
.section-title { font: 900 28px/1.2 var(--display); letter-spacing: -.8px; margin: 10px 0 24px; display: flex; gap: 12px; align-items: center; }
.section-title::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--grass); border: 3px solid var(--ink); }
.page-head { padding: 34px 0 6px; }
.page-head h1 { font: 900 clamp(30px, 4vw, 46px)/1.1 var(--display); letter-spacing: -1px; margin: 12px 0 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.toy {
  background: var(--card); border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s; display: flex; flex-direction: column;
}
.toy:hover { transform: translate(-3px, -5px) rotate(-1.2deg); box-shadow: 10px 11px 0 var(--ink); }
.toy:nth-child(even):hover { transform: translate(-3px, -5px) rotate(1.2deg); }
.toy .img { display: block; aspect-ratio: 4 / 3; border-bottom: 3px solid var(--ink); position: relative; background: #ffe6c7; overflow: hidden; }
.toy .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag {
  display: inline-block; font: 700 11px/1.2 var(--display); padding: 5px 10px; border: 2.5px solid var(--ink);
  border-radius: 10px; background: var(--sun); color: var(--ink);
}
.toy .tag { position: absolute; left: 12px; top: 12px; }
.toy:nth-child(3n+2) .tag { background: var(--berry); }
.toy:nth-child(3n) .tag { background: var(--sky); color: #fff; }
.toy .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.toy h2, .toy h3 { font: 800 18px/1.3 var(--text); margin: 0; }
.toy h2 a:hover, .toy h3 a:hover { color: var(--tomato); }
.toy p { margin: 0; font: 600 14px/1.5 var(--text); color: var(--muted); }
.toy .more { margin-top: auto; padding-top: 6px; font: 800 14px var(--text); color: var(--grass); }

.side .panel { background: var(--card); border: 3px solid var(--ink); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 28px; }
.side h3 { font: 800 16px/1.3 var(--display); margin: 0 0 14px; }
.side .about { background: var(--sky); color: #fff; }
.side .about p { margin: 0; font: 700 16px/1.45 var(--text); }
.side .about .emoji { font-size: 30px; display: block; margin-bottom: 4px; }
.side .list a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 2px dotted #d8dbe6; font: 700 15px/1.3 var(--text); }
.side .list a:last-child { border-bottom: 0; }
.side .list a:hover { color: var(--tomato); }
.side .list .n { width: 34px; height: 34px; border-radius: 12px; border: 2.5px solid var(--ink); display: grid; place-items: center; font: 900 13px var(--display); background: var(--sun); }
.side .list a:nth-child(3n+2) .n { background: var(--berry); }
.side .list a:nth-child(3n) .n { background: var(--grass); color: #fff; }
.side .reads a { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 2px dotted #d8dbe6; font: 700 14px/1.35 var(--text); }
.side .reads a:last-child { border-bottom: 0; }
.side .reads .noimg { width: 70px; height: 56px; border-radius: 12px; border: 2.5px solid var(--ink); display: grid; place-items: center; background: var(--sun); font-size: 22px; }
.side .reads a:nth-child(3n+1) .noimg { background: var(--berry); }
.side .reads a:nth-child(3n) .noimg { background: var(--sky); }
.side .reads img { width: 70px; height: 56px; object-fit: cover; border-radius: 12px; border: 2.5px solid var(--ink); display: block; }
.side .reads a:hover { color: var(--tomato); }
.side .sticky-ad { position: sticky; top: 16px; }

/* ---------- листание ---------- */
.pages { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding: 0; list-style: none; }
.pages a, .pages span {
  min-width: 48px; height: 48px; padding: 0 12px; display: grid; place-items: center; border: 3px solid var(--ink);
  border-radius: 14px; background: var(--card); font: 900 15px var(--display); box-shadow: 3px 3px 0 var(--ink);
}
.pages span { box-shadow: none; border-style: dashed; }
.pages a.on { background: var(--tomato); color: #fff; }
.pages a:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- статья ---------- */
.crumbs { font: 700 14px var(--text); color: var(--muted); margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a:hover { color: var(--tomato); }
.story { background: var(--card); border: 3px solid var(--ink); border-radius: 30px; box-shadow: var(--shadow); padding: 30px 34px 34px; }
.story h1 { font: 900 clamp(26px, 3.4vw, 40px)/1.15 var(--display); letter-spacing: -.8px; margin: 16px 0 22px; }
.story .cover { border: 3.5px solid var(--ink); border-radius: 26px; overflow: hidden; box-shadow: 8px 8px 0 var(--sun); margin: 0 0 28px; background: #ffe6c7; }
.story .cover img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.article-content { font: 600 18px/1.8 var(--text); color: #2c3550; overflow-wrap: break-word; }
.article-content > *:first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.1em; }
.article-content h2 {
  font: 900 24px/1.25 var(--display); letter-spacing: -.4px; margin: 1.7em 0 .7em; color: var(--ink);
  padding: 2px 0 2px 16px; border-left: 7px solid var(--sun); border-radius: 4px;
}
.article-content h2:nth-of-type(3n+2) { border-left-color: var(--berry); }
.article-content h2:nth-of-type(3n) { border-left-color: var(--grass); }
.article-content h3 { font: 800 20px/1.35 var(--text); margin: 1.4em 0 .5em; color: var(--ink); }
.article-content a { color: #2f7fd8; font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-content a:hover { color: var(--tomato); }
.article-content ul, .article-content ol { margin: 0 0 1.2em; padding-left: 0; list-style: none; }
.article-content li { position: relative; padding-left: 34px; margin-bottom: .55em; }
.article-content ul > li::before { content: ""; position: absolute; left: 6px; top: .5em; width: 14px; height: 14px; border-radius: 5px; border: 2.5px solid var(--ink); background: var(--grass); transform: rotate(12deg); }
.article-content ul > li:nth-child(3n+2)::before { background: var(--sun); }
.article-content ul > li:nth-child(3n)::before { background: var(--berry); }
.article-content ol { counter-reset: t12; }
.article-content ol > li { counter-increment: t12; }
.article-content ol > li::before { content: counter(t12); position: absolute; left: 0; top: .15em; width: 24px; height: 24px; border-radius: 8px; border: 2.5px solid var(--ink); background: var(--sky); color: #fff; font: 900 12px/19px var(--display); text-align: center; }
.article-content blockquote { margin: 1.5em 0; padding: 18px 22px 18px 58px; position: relative; background: #fff4d6; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); font-style: normal; }
.article-content blockquote::before { content: "💡"; position: absolute; left: 18px; top: 16px; font-size: 24px; }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content img { height: auto; border-radius: 20px; border: 3px solid var(--ink); display: block; margin: 0 auto; }
.article-content figure { margin: 1.8em 0; }
.article-content figcaption { font: 700 14px/1.4 var(--text); color: var(--muted); text-align: center; margin-top: 10px; }
.article-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.5em 0; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; font-size: 16px; display: block; overflow-x: auto; }
.article-content th, .article-content td { padding: 10px 14px; border-bottom: 2px solid #eceef5; text-align: left; vertical-align: top; }
.article-content th { background: var(--sun); font: 800 15px var(--text); }
.article-content tr:last-child td { border-bottom: 0; }
.article-content .article-credits, .article-content p.image-credits { font-size: 13px; color: var(--muted); }
.story .share { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 70px 0 60px; }
.lost .big { font: 900 clamp(90px, 16vw, 170px)/1 var(--display); letter-spacing: -6px; color: var(--sky); -webkit-text-stroke: 4px var(--ink); text-shadow: 8px 8px 0 var(--ink); }
.lost h1 { font: 900 30px/1.2 var(--display); margin: 26px 0 12px; }
.lost p { color: var(--ink-soft); margin: 0 0 28px; }

/* ---------- подвал ---------- */
.site-footer { background: var(--ink); color: #dfe4f2; padding: 70px 0 30px; position: relative; margin-top: 20px; }
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 40px; background: var(--bg);
  -webkit-mask: radial-gradient(28px 28px at 50% 0, #000 98%, transparent) 0 0 / 56px 40px repeat-x;
  mask: radial-gradient(28px 28px at 50% 0, #000 98%, transparent) 0 0 / 56px 40px repeat-x;
}
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer .logo { color: #fff; font: 900 22px/1.1 var(--display); letter-spacing: -.5px; }
.site-footer .logo img { background: #fff; border-radius: 14px; padding: 6px; }
.site-footer p { color: #b9c1d6; }
.site-footer h4 { font: 700 13px var(--display); color: var(--sun); margin: 6px 0 12px; }
.site-footer .cols a { display: block; padding: 3px 0; }
.site-footer .cols a:hover { color: var(--sun); }
.site-footer .copy { margin-top: 30px; padding-top: 16px; border-top: 2px dashed rgba(255, 255, 255, .2); font-size: 14px; color: #aab2c8; }
.site-footer .copy a { color: #dfe4f2; }

/* ---------- появление ---------- */
.pop { animation: t12-pop .6s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes t12-pop { from { opacity: 0; transform: scale(.9) translateY(16px); } }
.grid .toy:nth-child(2) { animation-delay: .08s; } .grid .toy:nth-child(3) { animation-delay: .16s; }
.grid .toy:nth-child(4) { animation-delay: .24s; } .grid .toy:nth-child(5) { animation-delay: .32s; }
.grid .toy:nth-child(n+6) { animation-delay: .4s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- экраны поменьше ---------- */
@media (max-width: 1060px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .hero, .layout, .site-footer .cols { grid-template-columns: 1fr; }
  .hero .pic { max-width: 520px; }
  .doodles { display: none; }
  .bar-top { justify-content: space-between; }
  .side .sticky-ad { position: static; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .rubrics { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 12px 14px 16px; }
  .rubrics a { padding: 10px 14px; font-size: 13px; }
  .bar-top { gap: 12px; padding: 12px 14px; }
  .brand .motto { font-size: 13px; }
  .bar .home { display: none; }
  .wrap { padding: 0 14px; }
  .grid { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding-top: 26px; }
  .hero .sticker { width: 84px; height: 84px; left: -8px; font-size: 12px; }
  .story { padding: 20px 18px 24px; border-radius: 24px; }
  .article-content { font-size: 17px; }
  .article-content h2 { font-size: 19px; padding-left: 12px; border-left-width: 5px; }
  .story h1 { font-size: 24px; }
  .logo img { max-height: 52px; }
}
