/* Theme 6 — «Солнечный сад» / kids & kindergarten (2026) */
:root {
  --k-ink: #1e293b;
  --k-ink-soft: #334155;
  --k-muted: #64748b;
  --k-white: #ffffff;
  --k-bg: #fff9f3;
  --k-card: #ffffff;
  --k-line: #fde68a;
  --k-pink: #f472b6;
  --k-pink-deep: #db2777;
  --k-coral: #fb7185;
  --k-orange: #fb923c;
  --k-yellow: #facc15;
  --k-green: #4ade80;
  --k-green-deep: #16a34a;
  --k-sky: #38bdf8;
  --k-sky-deep: #0284c7;
  --k-lilac: #a78bfa;
  --k-lilac-deep: #7c3aed;
  --k-radius: 22px;
  --k-radius-sm: 14px;
  --k-shadow: 0 14px 40px rgba(251, 113, 133, .12);
  --k-shadow-sm: 0 8px 22px rgba(30, 41, 59, .08);
  --k-font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --k-display: "Nunito", "Segoe UI", system-ui, sans-serif;
  --k-container: 1200px;
  --k-header-h: 0px;
  --k-side: 250px;
  --k-gap: 1.1rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body.theme-kids {
  margin: 0;
  padding: 0;
  font-family: var(--k-font);
  color: var(--k-ink);
  background:
    url("/themes/6/images/pattern-dots.svg"),
    linear-gradient(180deg, #fff7ed 0%, #e0f2fe 42%, #fdf2f8 100%);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  text-align: left;
}

/* Kill legacy float/width shells that shift layout */
body.theme-kids #top,
body.theme-kids #animals,
body.theme-kids .centered,
body.theme-kids #content.centered {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: auto !important;
  right: auto !important;
  position: relative !important;
  height: auto !important;
  background: none !important;
}

body.theme-kids .k-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  /* no z-index / overflow trap — modals live outside .k-page */
  overflow-x: visible;
}

body.theme-kids .k-expires {
  margin: 0 !important;
  border-radius: 0 !important;
}

body.theme-kids a {
  color: var(--k-sky-deep);
  text-decoration: none;
  transition: color .15s ease, opacity .15s ease, transform .15s ease;
}
body.theme-kids a:hover { color: var(--k-pink-deep); }

body.theme-kids img { max-width: 100%; height: auto; }

body.theme-kids h1,
body.theme-kids h2,
body.theme-kids h3,
body.theme-kids h4 {
  font-family: var(--k-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--k-ink);
  line-height: 1.2;
  margin: 0 0 .55em;
}

/* Layout shell — always centered */
.k-shell {
  width: 100%;
  max-width: var(--k-container);
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

/* Header */
.k-top {
  position: relative;
  z-index: 40;
  padding: 1.15rem 0 0;
}

/* Big logo identity panel (logo outside compact nav) */
.k-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.15rem 1.5rem;
  align-items: center;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border: 3px solid #fff;
  border-radius: 30px;
  box-shadow: var(--k-shadow);
  padding: 1.15rem 1.35rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.k-identity::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #f472b6, #fb923c, #facc15, #4ade80, #38bdf8, #a78bfa);
}

.k-logo {
  display: block;
  flex: 0 0 auto;
  text-decoration: none !important;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(251, 146, 60, .28);
  border: 4px solid #fff;
  background: linear-gradient(145deg, #fde047, #fb923c);
  transition: transform .18s ease, box-shadow .18s ease;
}

.k-logo:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 34px rgba(244, 114, 182, .3);
}

.k-logo__img {
  display: block;
  width: 148px;
  height: 148px;
  max-width: 148px;
  object-fit: contain;
  background: #fff;
}

.k-logo__placeholder {
  width: 148px;
  height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  background: linear-gradient(145deg, #fde68a, #fda4af);
}

.k-logo__emoji { font-size: 3.2rem; line-height: 1; }
.k-logo__hint {
  font-size: .75rem;
  font-weight: 900;
  color: #7c2d12;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.k-identity__text { min-width: 0; }

.k-identity__title {
  display: block;
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  font-weight: 900;
  color: var(--k-ink) !important;
  text-decoration: none !important;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 .4rem;
}

.k-identity__title:hover { color: var(--k-pink-deep) !important; }

.k-identity__tag {
  margin: 0 0 .65rem;
  color: var(--k-ink-soft);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  max-width: 40rem;
}

.k-identity__tag .header-edit {
  cursor: pointer;
  color: var(--k-lilac-deep);
  margin-left: .35rem;
}

.k-identity__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.k-pill {
  display: inline-flex;
  align-items: center;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

.k-pill--coral {
  background: #ffe4e6;
  color: #be123c;
}

.k-pill--sky {
  background: #e0f2fe;
  color: #0369a1;
}

.k-identity__tools {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-end;
  align-self: start;
  padding-top: .35rem;
}

.k-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  border: 2px solid transparent;
  background: #fdf2f8;
  color: var(--k-pink-deep) !important;
  white-space: nowrap;
}
.k-chip:hover {
  background: #fce7f3;
  color: var(--k-ink) !important;
}
.k-chip--sky {
  background: #e0f2fe;
  color: var(--k-sky-deep) !important;
}

/* Nav */
.k-nav-wrap {
  margin-top: .85rem;
}

.k-nav {
  list-style: none;
  margin: 0;
  padding: .45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  background: #fff;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: var(--k-shadow-sm);
}

.k-nav > li {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.k-nav > li > a {
  display: inline-flex;
  align-items: center;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .92rem;
  color: var(--k-ink-soft) !important;
  text-decoration: none !important;
  border: none !important;
}

.k-nav > li > a:hover,
.k-nav > li:hover > a {
  background: linear-gradient(135deg, #fce7f3, #e0f2fe);
  color: var(--k-ink) !important;
}

.k-nav li ul {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  margin: 0;
  padding: .45rem;
  list-style: none;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(30, 41, 59, .14);
  border: 2px solid #fde68a;
  z-index: 50;
}

.k-nav li:hover > ul { display: block; }

.k-nav li ul li a {
  display: block;
  padding: .55rem .75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--k-ink-soft) !important;
}

.k-nav li ul li a:hover {
  background: #fef3c7;
  color: var(--k-ink) !important;
}

/* Hero on index (optional band) */
.k-hero {
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.25rem;
  align-items: stretch;
}
.k-hero--solo {
  grid-template-columns: 1fr;
}
.k-hero--solo .k-hero__card {
  width: 100%;
}

.k-hero__card {
  background: linear-gradient(145deg, #fff 0%, #fff7ed 100%);
  border-radius: 28px;
  border: 3px solid #fff;
  box-shadow: var(--k-shadow);
  padding: 1.5rem 1.6rem 1.6rem;
  position: relative;
  overflow: hidden;
}

.k-hero__card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  background: url("/themes/6/images/deco-star.svg") center/contain no-repeat;
  opacity: .35;
  pointer-events: none;
}

.k-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #fce7f3;
  color: var(--k-pink-deep);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}

.k-hero__card h1 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  margin-bottom: .55rem;
  background: linear-gradient(90deg, #db2777, #ea580c, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.k-hero__lead {
  color: var(--k-ink-soft);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 36rem;
}

.k-hero__art {
  border-radius: 28px;
  border: 3px solid #fff;
  box-shadow: var(--k-shadow);
  overflow: hidden;
  background: #e0f2fe;
  min-height: 220px;
}
.k-hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Main grid — balanced 3 columns, never left-shifted */
.k-main {
  display: grid !important;
  grid-template-columns: var(--k-side) minmax(0, 1fr) var(--k-side);
  gap: var(--k-gap);
  margin: 1.15rem auto 2rem !important;
  align-items: start;
  width: 100%;
  max-width: var(--k-container);
  float: none !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
}

.k-side,
.k-content {
  min-width: 0;
  max-width: 100%;
}

.k-side {
  width: 100%;
}

.k-content {
  background: var(--k-card);
  border-radius: 28px;
  border: 3px solid #fff;
  box-shadow: var(--k-shadow);
  padding: 1.35rem 1.45rem 1.6rem;
  position: relative;
}

.k-content > h1:first-child {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  padding-bottom: .55rem;
  border-bottom: 3px dashed #fde68a;
  margin-bottom: 1rem;
}

/* Side cards */
.k-side .block_center,
.k-side #block-785 .block_center,
.k-side #block-771 .block_center,
.k-side #block-883 .block_center,
.k-side #block-7823 .block_center,
.k-side .side-box,
.k-side .side-content {
  background: #fff;
  border-radius: 22px;
  border: 3px solid #fff;
  box-shadow: var(--k-shadow-sm);
  margin-bottom: .9rem;
  overflow: hidden;
}

.k-side .block_center > h2,
.k-side .block_center h2 {
  margin: 0 !important;
  padding: .75rem 1rem !important;
  font-size: .95rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  border: 0 !important;
}

.k-side #block-771 .block_center > h2 {
  background: linear-gradient(135deg, #38bdf8, #a78bfa) !important;
}

.k-side #block-883 .block_center > h2 {
  background: linear-gradient(135deg, #4ade80, #22d3ee) !important;
}

/* Events calendar: single outer card, no second «Календарь» heading */
.k-side #block-cal.k-events-side {
  margin: 0 0 1rem !important;
}
.k-side #block-cal.k-events-side > .calendar-widget {
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08) !important;
  background: #fff !important;
}

.k-side #block-7823 .block_center > h2 {
  background: linear-gradient(135deg, #a78bfa, #f472b6) !important;
}

.k-side .block-content {
  padding: .75rem .9rem 1rem;
}

.k-side .block-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.k-side .block-content ul li {
  margin: 0 0 .25rem;
  padding: 0;
}

.k-side .block-content ul li a {
  display: block;
  padding: .5rem .65rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: .9rem;
  color: var(--k-ink-soft) !important;
  background: #fff7ed;
}

.k-side .block-content ul li a:hover {
  background: linear-gradient(90deg, #fce7f3, #e0f2fe);
  color: var(--k-ink) !important;
  transform: translateX(3px);
}

.k-side .block-content ul ul {
  margin: .25rem 0 .35rem .55rem;
  padding-left: .35rem;
  border-left: 3px solid #fde68a;
}

/* Login form */
.k-side .form_login_212d input[type=text],
.k-side .form_login_212d input[type=password],
.k-side .form_login_212d input[type=email],
.k-side .user_login_212d {
  width: 100% !important;
  border: 2px solid #fde68a !important;
  border-radius: 12px !important;
  padding: .55rem .7rem !important;
  margin-bottom: .45rem !important;
  background: #fffbeb !important;
  font-family: var(--k-font) !important;
}

.k-side .vxod_login_212d,
.k-side input[type=submit] {
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: .5rem 1rem !important;
  font-weight: 900 !important;
  cursor: pointer;
  font-family: var(--k-font) !important;
}

.k-side .search_form,
.k-side input[type=search] {
  width: 100%;
  border: 2px solid #bae6fd;
  border-radius: 12px;
  padding: .55rem .7rem;
  margin-bottom: .45rem;
  background: #f0f9ff;
  font-family: var(--k-font);
}

/* Content typography */
.k-content .content_text,
body.theme-kids .content_text {
  font-size: 1.02rem;
  color: var(--k-ink-soft);
  line-height: 1.7;
}

body.theme-kids .content_text img {
  border-radius: 14px;
  box-shadow: var(--k-shadow-sm);
}

body.theme-kids .content_text a {
  color: var(--k-sky-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Article cards on home */
.k-articles,
body.theme-kids .mtr {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
  background: linear-gradient(180deg, #fff, #fff7ed);
  border: 2px solid #fde68a;
  border-radius: 20px;
  padding: 1rem;
  margin: 0 0 1rem;
  box-shadow: var(--k-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}

body.theme-kids .mtr:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(251, 146, 60, .15);
}

body.theme-kids .mtr .im,
body.theme-kids .mtr .inim {
  margin: 0;
  padding: 0;
}

body.theme-kids .mtr .inim img,
body.theme-kids .mtr img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

body.theme-kids .name_mtr h2 {
  font-size: 1.12rem;
  margin: 0 0 .35rem;
}

body.theme-kids .name_mtr h2 a {
  color: var(--k-ink) !important;
  text-decoration: none !important;
}
body.theme-kids .name_mtr h2 a:hover { color: var(--k-pink-deep) !important; }

body.theme-kids .article_counters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  margin-bottom: .45rem;
  font-size: .82rem;
  font-weight: 800;
  color: var(--k-muted);
}

body.theme-kids .article_counters .dats {
  background: #e0f2fe;
  color: var(--k-sky-deep);
  padding: .15rem .55rem;
  border-radius: 999px;
}

body.theme-kids .article_counters .views {
  background: #fce7f3;
  color: var(--k-pink-deep);
  padding: .15rem .55rem;
  border-radius: 999px;
}

body.theme-kids .mtr_d {
  margin: 0;
  color: var(--k-ink-soft);
  font-size: .95rem;
}

/* Buttons / forms inside content */
body.theme-kids .appeal_search_button,
body.theme-kids .btn-warning,
body.theme-kids .btn-primary {
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 800 !important;
  padding: .55rem 1.1rem !important;
  box-shadow: 0 8px 18px rgba(251, 113, 133, .25);
}

body.theme-kids .btn-info {
  background: linear-gradient(135deg, #38bdf8, #a78bfa) !important;
  border: 0 !important;
  border-radius: 999px !important;
}

body.theme-kids input[type=text],
body.theme-kids input[type=email],
body.theme-kids input[type=password],
body.theme-kids input[type=search],
body.theme-kids textarea,
body.theme-kids select {
  border: 2px solid #fde68a !important;
  border-radius: 12px !important;
  padding: .55rem .75rem !important;
  background: #fffbeb !important;
  font-family: var(--k-font) !important;
}

body.theme-kids .post-details {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 2px dashed #fde68a;
  color: var(--k-muted);
  font-weight: 700;
}

/* Footer */
.k-footer {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.4rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #e2e8f0;
  border: 3px solid #fff;
  box-shadow: var(--k-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.k-footer a { color: #fde047 !important; font-weight: 800; }
.k-footer a:hover { color: #fff !important; }
.k-footer__brand {
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
}
.k-footer__meta {
  font-size: .9rem;
  color: #94a3b8;
  font-weight: 600;
}

.k-footer__deco {
  display: flex;
  gap: .35rem;
  align-items: center;
}
.k-footer__deco img {
  width: 28px;
  height: 28px;
}

/* Floating decorations */
.k-float {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}
.k-float--balloon {
  right: 1.5%;
  top: 22%;
  width: 48px;
  animation: k-float 5s ease-in-out infinite;
}
.k-float--star {
  left: 2%;
  top: 40%;
  width: 36px;
  animation: k-float 6s ease-in-out infinite reverse;
}
.k-float--rainbow {
  left: 3%;
  bottom: 8%;
  width: 110px;
  opacity: .4;
}

@keyframes k-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Back to top */
body.theme-kids .buttonup {
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(251, 113, 133, .35) !important;
  border: 3px solid #fff !important;
}

/* Alerts */
body.theme-kids .alert {
  border-radius: 16px !important;
  border: 0 !important;
  font-weight: 700;
}

/* Hide legacy decorative images if still present */
body.theme-kids .catbird,
body.theme-kids .flowers,
body.theme-kids #animals,
body.theme-kids img.coleb {
  display: none !important;
}

/* Calendar widget — full redesign (self-contained) */
body.theme-kids .calendar-widget,
body.theme-kids .side-box.calendar-widget {
  padding: 0 !important;
  overflow: hidden;
}

body.theme-kids .calendar-widget .block_center {
  margin-bottom: 0 !important;
}

body.theme-kids .calendar-widget .block-content {
  padding: 0 !important;
}

body.theme-kids .calendar {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  font-family: var(--k-font) !important;
  box-sizing: border-box !important;
}

body.theme-kids .calendar .block-header {
  position: relative !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .4rem .55rem !important;
  margin: 0 0 .65rem !important;
  padding: .85rem .85rem 2.4rem !important;
  background: linear-gradient(120deg, #f472b6, #fb923c 55%, #facc15) !important;
  border-radius: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}

body.theme-kids .calendar .block-header p {
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font: 800 .88rem/1.2 var(--k-font) !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex: 1 1 auto;
  background: none !important;
}

body.theme-kids .calendar .month {
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 !important;
  padding: .28rem .65rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .22) !important;
  color: #fff !important;
  font: 800 .8rem/1.2 var(--k-font) !important;
  text-decoration: none !important;
  opacity: 1 !important;
  white-space: nowrap;
}

body.theme-kids .calendar .month:hover {
  background: rgba(255, 255, 255, .35) !important;
  color: #fff !important;
}

body.theme-kids .calendar-prev,
body.theme-kids .calendar-next {
  position: absolute !important;
  bottom: .65rem !important;
  width: 34px !important;
  height: 28px !important;
  border: 1px solid rgba(255, 255, 255, .4) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .2) !important;
  background-image: none !important;
  opacity: 1 !important;
  cursor: pointer !important;
  padding: 0 !important;
  color: #fff !important;
  font-size: 1.2rem !important;
  line-height: 1 !important;
  display: grid !important;
  place-items: center !important;
}

body.theme-kids .calendar-prev { right: 3rem !important; }
body.theme-kids .calendar-next { right: .75rem !important; }
body.theme-kids .calendar-prev::before { content: "‹"; font-weight: 900; }
body.theme-kids .calendar-next::before { content: "›"; font-weight: 900; }
body.theme-kids .calendar-prev:hover,
body.theme-kids .calendar-next:hover {
  background: rgba(255, 255, 255, .35) !important;
}

body.theme-kids .calendar .out,
body.theme-kids .calendar .in {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 .75rem .85rem !important;
  float: none !important;
  box-sizing: border-box !important;
  display: block !important;
  overflow: visible !important;
}

/* Override common layout.css table/block hacks */
body.theme-kids .calendar table,
body.theme-kids #content .calendar,
body.theme-kids .k-side .calendar {
  display: block !important;
  overflow: visible !important;
}

body.theme-kids .calendar .days {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: .22rem !important;
  margin: 0 0 .4rem !important;
  text-align: center !important;
  float: none !important;
  width: 100% !important;
}

body.theme-kids .calendar .days .cell {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  display: block !important;
  min-width: 0 !important;
}

body.theme-kids .calendar .days .cell p {
  margin: 0 !important;
  padding: .15rem 0 !important;
  color: var(--k-pink-deep) !important;
  font: 800 .68rem/1.2 var(--k-font) !important;
  text-transform: uppercase;
  letter-spacing: .01em;
}

body.theme-kids .calendar .list {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: .22rem !important;
  margin: 0 !important;
  float: none !important;
  text-align: center !important;
  width: 100% !important;
}

body.theme-kids .calendar .list:after,
body.theme-kids .calendar .clear {
  display: none !important;
}

body.theme-kids .calendar .list .cell {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  vertical-align: top !important;
  aspect-ratio: 1 / 1;
  min-width: 0 !important;
}

body.theme-kids .calendar .numb {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: #fff7ed !important;
  color: var(--k-ink-soft) !important;
  font: 800 .75rem/1 var(--k-font) !important;
  box-sizing: border-box !important;
}

body.theme-kids .calendar .cell.today > .numb {
  background: #fef08a !important;
  box-shadow: inset 0 0 0 2px #f59e0b !important;
  color: #92400e !important;
}

body.theme-kids .calendar .event {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(160deg, #f472b6, #fb923c) !important;
  color: #fff !important;
  font: 800 .75rem/1 var(--k-font) !important;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(244, 114, 182, .3);
  transition: transform .12s ease, filter .12s ease;
}

body.theme-kids .calendar .event:hover {
  filter: brightness(1.06);
  transform: scale(1.05);
  color: #fff !important;
}

/* Empty state */
.k-empty {
  text-align: center;
  padding: 2rem 1rem;
}
.k-empty__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: .75rem;
}
.k-empty p {
  color: var(--k-muted);
  font-weight: 700;
}

/* Footer shell */
body.theme-kids .k-footer.k-shell {
  max-width: var(--k-container);
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Responsive */
@media (max-width: 1100px) {
  :root { --k-side: 220px; }
  .k-main {
    grid-template-columns: var(--k-side) minmax(0, 1fr);
  }
  .k-side--right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
  }
  .k-hero { grid-template-columns: 1fr; }
  .k-logo__img,
  .k-logo__placeholder {
    width: 120px;
    height: 120px;
    max-width: 120px;
  }
}

@media (max-width: 820px) {
  .k-identity {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 1.1rem 1rem 1.2rem;
  }
  .k-identity__tools {
    justify-content: center;
    align-self: center;
    padding-top: 0;
  }
  .k-identity__meta { justify-content: center; }
  .k-identity__tag { margin-left: auto; margin-right: auto; }
  .k-logo__img,
  .k-logo__placeholder {
    width: 132px;
    height: 132px;
    max-width: 132px;
  }
  .k-main {
    grid-template-columns: 1fr !important;
  }
  .k-side--right {
    grid-template-columns: 1fr;
  }
  .k-nav {
    border-radius: 20px;
  }
  body.theme-kids .mtr {
    grid-template-columns: 1fr;
  }
  body.theme-kids .mtr .inim img {
    height: 160px;
  }
  .k-float { display: none; }
}

@media (max-width: 480px) {
  .k-logo__img,
  .k-logo__placeholder {
    width: 112px;
    height: 112px;
    max-width: 112px;
  }
  .k-shell {
    padding-left: .75rem;
    padding-right: .75rem;
  }
}

/* Admin / sveden compatibility tweaks */
body.theme-kids .admin_py,
body.theme-kids .nav {
  font-family: var(--k-font) !important;
}

/* When background image is set by domain admin */
body.theme-kids.has-bg-image {
  background-size: cover;
  background-attachment: fixed;
}
body.theme-kids.has-bg-image .k-content,
body.theme-kids.has-bg-image .k-identity,
body.theme-kids.has-bg-image .k-side .block_center {
  background: rgba(255,255,255,.94);
}

/* Prevent common layout.css from breaking calendar cells */
body.theme-kids #content .calendar .list .cell,
body.theme-kids #content .calendar .days .cell {
  display: block !important;
  overflow: visible !important;
}

/* ========== Modals (kids theme) ========== */
body.theme-kids.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

body.theme-kids .modal-backdrop {
  background: rgba(30, 41, 59, .55) !important;
  z-index: 1040 !important;
}

body.theme-kids .modal {
  z-index: 1050 !important;
}

body.theme-kids .modal-dialog {
  margin: 1.75rem auto;
  pointer-events: auto !important;
  z-index: 1055 !important;
}

body.theme-kids .modal-content {
  pointer-events: auto !important;
}

/* Decorative floats must never block modals / clicks */
body.theme-kids .k-float {
  z-index: 0 !important;
  pointer-events: none !important;
}

body.theme-kids .modal-content,
body.theme-kids .modal .modal-content {
  border: 0 !important;
  border-radius: 24px !important;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(30, 41, 59, .28) !important;
  font-family: var(--k-font) !important;
}

body.theme-kids .modal-header {
  border: 0 !important;
  padding: 1.15rem 1.35rem .65rem !important;
  background: linear-gradient(120deg, #fce7f3, #fff7ed 50%, #e0f2fe) !important;
  position: relative;
}

body.theme-kids .modal-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, #f472b6, #fb923c, #facc15, #4ade80, #38bdf8);
}

body.theme-kids .modal-title,
body.theme-kids .modal-header h4,
body.theme-kids .modal-header #title-modal {
  font-family: var(--k-font) !important;
  font-weight: 900 !important;
  font-size: 1.15rem !important;
  color: var(--k-ink) !important;
  letter-spacing: -0.02em;
  margin: 0 !important;
  line-height: 1.3 !important;
}

body.theme-kids .modal-header .close {
  opacity: .7;
  font-size: 1.6rem;
  font-weight: 400;
  text-shadow: none;
  color: var(--k-ink);
}

body.theme-kids .modal-body {
  padding: 1rem 1.35rem 1.15rem !important;
  color: var(--k-ink-soft) !important;
  font-size: 1rem !important;
  line-height: 1.55 !important;
  font-weight: 600;
}

body.theme-kids .modal-body p {
  margin: 0 0 .75rem;
  color: var(--k-ink-soft);
  font-weight: 600;
}

body.theme-kids .modal-footer {
  border: 0 !important;
  padding: .85rem 1.35rem 1.25rem !important;
  background: #fff !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: flex-end;
  align-items: center;
}

body.theme-kids .modal-footer .btn,
body.theme-kids .modal-footer .btn-default,
body.theme-kids .modal-footer .btn-submit,
body.theme-kids .modal-footer button,
body.theme-kids .modal-footer input[type=submit] {
  border-radius: 999px !important;
  font-weight: 800 !important;
  font-family: var(--k-font) !important;
  padding: .55rem 1.15rem !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.theme-kids .modal-footer .btn-default {
  background: #f1f5f9 !important;
  color: var(--k-ink-soft) !important;
}

body.theme-kids .modal-footer .btn-danger,
body.theme-kids .modal-footer .remove,
body.theme-kids .modal-footer .removeBgBtn,
body.theme-kids .modal-footer .yesRemoveGallery {
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  color: #fff !important;
}

body.theme-kids .modal-footer .btn-primary,
body.theme-kids .modal-footer .btn-success,
body.theme-kids .modal-footer .btn-submit,
body.theme-kids .modal-footer input[type=submit],
body.theme-kids .modal-footer .btn-warning {
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  color: #fff !important;
}

/* ===== Photo gallery (theme 6) ===== */
.k-gallery-page {
  display: grid;
  gap: 1.1rem;
}

.k-gallery-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.k-gallery-page__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--k-ink, #0f172a);
}

.k-gallery-page__create {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .9rem;
  text-decoration: none !important;
  color: #fff !important;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9 45%, #f472b6);
  box-shadow: 0 10px 22px rgba(14, 165, 233, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.k-gallery-page__create:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(244, 114, 182, .28);
  color: #fff !important;
}

.k-albums {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .k-albums {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.k-album-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  text-decoration: none !important;
  color: inherit !important;
  background: linear-gradient(180deg, #fff, #f0f9ff);
  border: 2px solid #bae6fd;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.k-album-card:hover {
  transform: translateY(-4px);
  border-color: #7dd3fc;
  box-shadow: 0 18px 36px rgba(14, 165, 233, .18);
}

.k-album-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, .25), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, .2), transparent 40%),
    linear-gradient(145deg, #e0f2fe, #fce7f3 55%, #fef3c7);
  overflow: hidden;
}

.k-album-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.k-album-card__empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  opacity: .7;
}

.k-album-card__date {
  position: absolute;
  top: .7rem;
  left: .7rem;
  min-width: 3.1rem;
  padding: .35rem .45rem;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
  line-height: 1.05;
}

.k-album-card__day {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0ea5e9;
}

.k-album-card__month {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  text-transform: lowercase;
  color: #64748b;
}

.k-album-card__count {
  position: absolute;
  right: .7rem;
  bottom: .7rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}

.k-album-card__body {
  display: grid;
  gap: .65rem;
  padding: .9rem 1rem 1rem;
}

.k-album-card__title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--k-ink, #0f172a);
  line-height: 1.3;
}

.k-album-card__thumbs {
  display: flex;
  gap: .35rem;
}

.k-album-card__thumb {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .1);
  flex: 0 0 auto;
}

.k-album-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.k-gallery-empty {
  display: grid;
  place-items: center;
  gap: .65rem;
  padding: 2.2rem 1.2rem;
  border-radius: 22px;
  border: 2px dashed #bae6fd;
  background: linear-gradient(180deg, #f0f9ff, #fff);
  text-align: center;
}

.k-gallery-empty--compact {
  padding: 1.4rem 1rem;
}

.k-gallery-empty__icon {
  font-size: 2.2rem;
}

.k-gallery-empty__text {
  margin: 0;
  font-weight: 800;
  color: #64748b;
}

.k-gallery-page__pager {
  margin-top: .5rem;
}

/* Single gallery */
.k-gallery-show {
  display: grid;
  gap: 1.1rem;
}

.k-gallery-show__head {
  position: relative;
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: 22px;
  background:
    radial-gradient(320px 120px at 100% 0%, rgba(251, 191, 36, .2), transparent 55%),
    radial-gradient(280px 120px at 0% 0%, rgba(56, 189, 248, .18), transparent 50%),
    linear-gradient(180deg, #fff, #f8fafc);
  border: 2px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.k-gallery-show__back {
  display: inline-flex;
  margin-bottom: .45rem;
  font-size: .86rem;
  font-weight: 800;
  color: #0ea5e9 !important;
  text-decoration: none !important;
}

.k-gallery-show__back:hover {
  color: #0284c7 !important;
}

.k-gallery-show__title {
  margin: 0 0 .45rem;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--k-ink, #0f172a);
  line-height: 1.25;
  padding-right: 7rem;
}

.k-gallery-show__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
  font-size: .88rem;
  font-weight: 700;
  color: #64748b;
}

.k-gallery-show__actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.k-gallery-show__desc {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #fde68a;
}

.k-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

@media (min-width: 560px) {
  .k-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
  }
}

@media (min-width: 900px) {
  .k-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.k-gallery-grid__item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid #e0f2fe;
  background: #f0f9ff;
  box-shadow: 0 8px 18px rgba(14, 165, 233, .08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.k-gallery-grid__item:hover {
  transform: scale(1.02);
  border-color: #7dd3fc;
  box-shadow: 0 14px 28px rgba(14, 165, 233, .16);
}

.k-gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 560px) {
  .k-gallery-show__title {
    padding-right: 0;
    font-size: 1.3rem;
  }
  .k-gallery-show__actions {
    position: static;
    margin-top: .65rem;
  }
}

body.theme-kids .modal-footer .btn-warning {
  background: linear-gradient(135deg, #38bdf8, #a78bfa) !important;
}

body.theme-kids .modal .form-control,
body.theme-kids .modal textarea {
  border: 2px solid #fde68a !important;
  border-radius: 14px !important;
  background: #fffbeb !important;
  font-family: var(--k-font) !important;
  font-weight: 600 !important;
}

body.theme-kids .modal .alert {
  border-radius: 14px !important;
  font-weight: 700 !important;
  border: 0 !important;
}

body.theme-kids .modal .alert-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}

/* Cookie / personal data bar */
body.theme-kids .personal-data-processing-agreement-widget {
  z-index: 9999 !important;
}

body.theme-kids .personal-data-processing-agreement-widget .wrapper {
  background: #fff !important;
  border-radius: 20px !important;
  border: 3px solid #fff !important;
  box-shadow: 0 18px 40px rgba(30, 41, 59, .2) !important;
  padding: 1rem 1.15rem !important;
  font-family: var(--k-font) !important;
  font-weight: 700 !important;
  color: var(--k-ink-soft) !important;
}

body.theme-kids .personal-data-processing-agreement-widget .acceptance-button {
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
  padding: .45rem 1rem !important;
  font-family: var(--k-font) !important;
}

/* ========== hCaptcha ========== */
body.theme-kids .k-captcha {
  margin: 1rem 0 1.15rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: #fff7ed;
  border: 2px dashed #fde68a;
  text-align: center;
}

body.theme-kids .k-captcha__label {
  font-weight: 800;
  font-size: .9rem;
  color: var(--k-ink-soft);
  margin-bottom: .65rem;
}

body.theme-kids .k-captcha .h-captcha,
body.theme-kids .h-captcha {
  display: inline-block !important;
  margin: 0 auto;
  min-height: 78px;
  visibility: visible !important;
  opacity: 1 !important;
}

body.theme-kids .k-captcha iframe,
body.theme-kids .h-captcha iframe {
  display: inline-block !important;
  visibility: visible !important;
  max-width: 100% !important;
}

body.theme-kids .k-captcha__error {
  margin-top: .55rem;
  color: #b91c1c;
  font-weight: 800;
  font-size: .88rem;
}

body.theme-kids .k-form-actions {
  text-align: center;
  margin-top: .5rem;
}

/* ========== Polls ========== */
body.theme-kids .k-poll,
body.theme-kids .y212d_poll {
  font-family: var(--k-font);
}

body.theme-kids .k-poll {
  padding: .15rem 0 .35rem;
}

body.theme-kids .k-poll__title,
body.theme-kids .y212d_poll_title {
  display: block;
  font-weight: 900 !important;
  font-size: .98rem !important;
  color: var(--k-ink) !important;
  margin: 0 0 .75rem !important;
  line-height: 1.3 !important;
  font-style: normal !important;
}

body.theme-kids .k-poll__options {
  display: grid;
  gap: .45rem;
  margin-bottom: .85rem;
}

body.theme-kids .k-poll__option {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0 !important;
  padding: .55rem .65rem;
  border-radius: 14px;
  background: #fff7ed;
  border: 2px solid #fde68a;
  cursor: pointer;
  font-weight: 700;
  color: var(--k-ink-soft);
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

body.theme-kids .k-poll__option:hover {
  background: #fce7f3;
  border-color: #f9a8d4;
  transform: translateX(2px);
}

body.theme-kids .k-poll__input {
  margin-top: .2rem;
  accent-color: #ec4899;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

body.theme-kids .k-poll__label {
  flex: 1;
  line-height: 1.35;
  font-size: .9rem;
}

body.theme-kids .k-poll__btn,
body.theme-kids .y212d_poll_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: .25rem 0 0 !important;
  padding: .6rem 1rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #f472b6, #fb923c) !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-family: var(--k-font) !important;
  font-size: .92rem !important;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(244, 114, 182, .28);
}

body.theme-kids .k-poll__btn:hover,
body.theme-kids .y212d_poll_button:hover {
  filter: brightness(1.05);
}

body.theme-kids .k-poll__results {
  list-style: none;
  margin: 0 0 .85rem;
  padding: 0;
  display: grid;
  gap: .7rem;
}

body.theme-kids .k-poll__result-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .5rem;
  margin-bottom: .3rem;
}

body.theme-kids .k-poll__result-label {
  font-weight: 800;
  font-size: .88rem;
  color: var(--k-ink);
}

body.theme-kids .k-poll__result-meta {
  font-size: .78rem;
  font-weight: 800;
  color: var(--k-muted);
}

body.theme-kids .k-poll__bar {
  height: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

body.theme-kids .k-poll__bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f472b6, #fb923c, #facc15);
  min-width: 4px;
}

body.theme-kids .k-poll__total,
body.theme-kids .y212d_answer_all {
  text-align: center;
  font-size: .88rem;
  font-weight: 800;
  color: var(--k-ink-soft);
  padding: .55rem .65rem;
  border-radius: 12px;
  background: #e0f2fe;
  margin: 0 !important;
}

/* legacy poll markup fallbacks */
body.theme-kids .y212d_poll_answer {
  margin-bottom: .45rem !important;
  padding: .45rem .55rem;
  border-radius: 12px;
  background: #fff7ed;
  border: 2px solid #fde68a;
}

body.theme-kids .y212d_answer_line {
  height: 10px !important;
  border-radius: 999px !important;
  margin: .25rem 0 .65rem !important;
  background: linear-gradient(90deg, #f472b6, #fb923c) !important;
}

/* Nested duplicate IDs from sidebars — keep clean */
body.theme-kids .k-side #forparents2,
body.theme-kids .k-side #forparents2sm,
body.theme-kids .k-side #sort_block {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

/* ========== Public profile (theme 6) ========== */
.k-profile {
  max-width: 760px;
  margin: 0 auto .75rem;
  font-family: var(--k-font);
}

.k-profile__hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem 1.4rem;
  margin: 0 0 1rem;
  padding: 1.35rem 1.35rem 1.4rem;
  border-radius: calc(var(--k-radius) + 6px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(380px 180px at 100% 0%, rgba(250, 204, 21, .35), transparent 55%),
    linear-gradient(125deg, #f472b6 0%, #fb923c 48%, #38bdf8 100%);
  box-shadow: var(--k-shadow);
  border: 3px solid rgba(255, 255, 255, .45);
}

.k-profile__hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.k-profile__bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.k-profile__bubble--1 { width: 90px; height: 90px; right: -18px; top: -24px; }
.k-profile__bubble--2 { width: 48px; height: 48px; right: 70px; bottom: 18px; }
.k-profile__bubble--3 { width: 28px; height: 28px; left: 42%; top: 16px; background: rgba(250, 204, 21, .35); }

.k-profile__avatar-wrap {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.k-profile__avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .75);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  background: #fff;
}

.k-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.k-profile__avatar-badge {
  position: absolute;
  right: -2px;
  bottom: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .95rem;
  color: #7c3aed;
  background: linear-gradient(145deg, #fef08a, #fde68a);
  border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}

.k-profile__hero-text {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1 1 220px;
}

.k-profile__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}

.k-profile__name {
  margin: 0 0 .55rem !important;
  font-family: var(--k-display) !important;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem) !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  color: #fff !important;
  letter-spacing: -.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.k-profile__lead {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 .9rem;
}

.k-profile__chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: .82rem;
  font-weight: 800;
  color: #fff;
}

.k-profile__chip .fa { opacity: .9; }

.k-profile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.k-profile__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .62rem 1.05rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .9rem;
  text-decoration: none !important;
  border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  line-height: 1.2;
}

.k-profile__btn:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

.k-profile__btn--primary {
  background: #fff;
  color: #db2777 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

.k-profile__btn--primary:hover {
  background: #fff7ed;
  color: #be185d !important;
}

.k-profile__btn--soft {
  background: rgba(255, 255, 255, .16);
  color: #fff !important;
  border-color: rgba(255, 255, 255, .4);
}

.k-profile__btn--soft:hover {
  background: rgba(255, 255, 255, .26);
  color: #fff !important;
}

.k-profile__btn--sm {
  padding: .5rem .9rem;
  font-size: .85rem;
}

.k-profile__card {
  background: var(--k-card);
  border-radius: var(--k-radius);
  border: 2px solid #fde68a;
  box-shadow: var(--k-shadow-sm);
  overflow: hidden;
}

.k-profile__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.05rem 1.2rem .85rem;
  background: linear-gradient(180deg, #fff7ed, #fff);
  border-bottom: 2px dashed #fde68a;
}

.k-profile__card-title {
  margin: 0 0 .2rem !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: var(--k-ink) !important;
  font-family: var(--k-display) !important;
}

.k-profile__card-sub {
  margin: 0;
  font-size: .86rem;
  font-weight: 700;
  color: var(--k-muted);
}

.k-profile__card-emoji {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(251, 146, 60, .25));
}

.k-profile__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  padding: 1rem 1.15rem 1.05rem;
}

.k-profile__item {
  padding: .75rem .85rem;
  border-radius: var(--k-radius-sm);
  background: linear-gradient(180deg, #fffbeb, #fff);
  border: 1px solid #fef3c7;
  min-width: 0;
}

.k-profile__item--wide {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #ecfeff, #fff);
  border-color: #bae6fd;
}

.k-profile__label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--k-muted);
  margin-bottom: .25rem;
}

.k-profile__value {
  font-size: .98rem;
  font-weight: 800;
  color: var(--k-ink);
  word-break: break-word;
}

.k-profile__value a {
  color: var(--k-sky-deep) !important;
  font-weight: 800;
  text-decoration: none !important;
}

.k-profile__value a:hover {
  color: var(--k-pink-deep) !important;
}

.k-profile__value--muted {
  color: var(--k-muted);
  letter-spacing: .12em;
}

.k-profile__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1.15rem 1.1rem;
  background: linear-gradient(180deg, #fdf2f8, #fff);
  border-top: 2px dashed #fbcfe8;
}

.k-profile__hint {
  margin: 0;
  font-size: .84rem;
  font-weight: 700;
  color: var(--k-muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.k-profile__foot .k-profile__btn--primary {
  color: #fff !important;
  background: linear-gradient(180deg, #f472b6, #db2777);
  box-shadow: 0 10px 22px rgba(219, 39, 119, .25);
}

.k-profile__foot .k-profile__btn--primary:hover {
  color: #fff !important;
  background: linear-gradient(180deg, #f9a8d4, #be185d);
}

/* Hide legacy section_title if any */
.theme-kids .k-profile + .title,
.theme-kids #forparentssm > .title.tBlue:first-child {
  /* keep normal titles elsewhere */
}

@media (max-width: 640px) {
  .k-profile__hero {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem 1rem 1.3rem;
  }

  .k-profile__lead,
  .k-profile__actions {
    justify-content: center;
  }

  .k-profile__grid {
    grid-template-columns: 1fr;
  }

  .k-profile__item--wide {
    grid-column: auto;
  }

  .k-profile__foot {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .k-profile__hint {
    justify-content: center;
  }

  .k-profile__foot .k-profile__btn {
    width: 100%;
  }
}

/* ========== Category feed (theme 6) ========== */
.k-cat { max-width: 820px; margin: 0 auto .75rem; }

.k-cat__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.1rem;
  padding: 1.15rem 1.25rem;
  border-radius: calc(var(--k-radius) + 4px);
  background:
    radial-gradient(320px 140px at 100% 0%, rgba(250, 204, 21, .35), transparent 55%),
    linear-gradient(125deg, #fb923c 0%, #f472b6 50%, #38bdf8 100%);
  color: #fff;
  box-shadow: var(--k-shadow);
  border: 3px solid rgba(255,255,255,.45);
}
.k-cat__hero--single { margin-bottom: 1rem; }
.k-cat__eyebrow {
  display: inline-flex;
  padding: .22rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.k-cat__title {
  margin: 0 !important;
  font-family: var(--k-display) !important;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1.2 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.k-cat__lead {
  margin: .35rem 0 0;
  font-weight: 700;
  font-size: .92rem;
  color: rgba(255,255,255,.92);
}
.k-cat__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .55rem .95rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none !important;
  border: 2px solid transparent;
  transition: transform .12s ease, background .15s ease;
  line-height: 1.2;
  cursor: pointer;
}
.k-cat__btn:hover { transform: translateY(-1px); text-decoration: none !important; }
.k-cat__btn--primary {
  background: #fff;
  color: #db2777 !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.k-cat__btn--soft {
  background: #ecfeff;
  color: #0e7490 !important;
  border-color: #a5f3fc;
}
.k-cat__btn--ghost {
  background: rgba(255,255,255,.18);
  color: #fff !important;
  border-color: rgba(255,255,255,.4);
}
.k-cat__hero .k-cat__btn--ghost { color: #fff !important; }
.k-feed-card__foot .k-cat__btn--ghost,
.k-article-card .k-cat__btn--ghost {
  background: #fff7ed;
  color: #c2410c !important;
  border-color: #fed7aa;
}
.k-cat__btn.is-disabled,
.k-cat__btn.is-disabled:hover {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.k-feed {
  display: grid;
  gap: 1.1rem;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

/* Full-width post cards (category list) — no side-shifted columns */
.k-post-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: var(--k-card);
  border: 2px solid #fde68a;
  border-radius: var(--k-radius);
  box-shadow: var(--k-shadow-sm);
  overflow: visible;
  position: relative;
  z-index: 1;
  transition: box-shadow .18s ease, transform .18s ease;
}
.k-post-card:hover,
.k-post-card:focus-within {
  z-index: 20;
  box-shadow: var(--k-shadow);
}
.k-post-card__top {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem .65rem;
  width: 100%;
}
.k-post-card__thumb {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .1);
  background: linear-gradient(145deg, #ffedd5, #e0f2fe);
}
.k-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.k-post-card__head {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.k-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--k-muted);
  margin-bottom: .35rem;
}
.k-post-card__title {
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  font-family: var(--k-display) !important;
  line-height: 1.3 !important;
  text-align: left !important;
}
.k-post-card__title a {
  color: var(--k-ink) !important;
  text-decoration: none !important;
}
.k-post-card__title a:hover { color: var(--k-pink-deep) !important; }

/* Preview: full width, left-aligned, no TinyMCE float/shift artifacts */
.k-post-card__preview {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: .35rem 1.1rem .85rem;
  box-sizing: border-box;
  text-align: left;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--k-ink-soft);
  overflow: visible;
  clear: both;
}
.k-post-card__preview::after {
  content: "";
  display: table;
  clear: both;
}
.k-post-card__preview p,
.k-post-card__preview div,
.k-post-card__preview span {
  max-width: 100% !important;
}
/* neutralize editor inline push (center alone is ok; kill floats/margins that shift block) */
.k-post-card__preview * {
  box-sizing: border-box;
}
.k-post-card__preview p {
  margin: 0 0 .55rem !important;
  padding: 0 !important;
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
}
.k-post-card__preview img,
.k-post-card__preview iframe {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
}
.k-post-card__preview .k-video {
  width: 100% !important;
  max-width: 100% !important;
  margin: .7rem 0 .9rem !important;
  float: none !important;
  left: auto !important;
  right: auto !important;
}
/* Soften giant editor fonts in list; keep color if set */
.k-post-card__preview [style*="font-size"] {
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
}
.k-post-card__preview [style*="font-family"] {
  font-family: var(--k-font) !important;
}

.k-post-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .15rem 1.1rem 1rem;
  position: relative;
  z-index: 2;
}

/* legacy feed-card classes (search etc.) */
.k-feed-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  background: var(--k-card);
  border: 2px solid #fde68a;
  border-radius: var(--k-radius);
  overflow: visible;
  box-shadow: var(--k-shadow-sm);
  position: relative;
  z-index: 1;
}
.k-feed-card--with-media {
  grid-template-columns: 140px minmax(0, 1fr);
}
.k-feed-card:hover,
.k-feed-card:focus-within {
  z-index: 20;
  box-shadow: var(--k-shadow);
}
.k-feed-card__media {
  display: block;
  min-height: 140px;
  background: linear-gradient(145deg, #ffedd5, #e0f2fe);
  overflow: hidden;
  border-radius: calc(var(--k-radius) - 2px) 0 0 calc(var(--k-radius) - 2px);
}
.k-feed-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 140px;
}
.k-feed-card__media--empty {
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.k-feed-card__body {
  padding: .9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.k-feed-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .75rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--k-muted);
  margin-bottom: .4rem;
}
.k-feed-card__views i { margin-right: .2rem; }
.k-feed-card__status--ok { color: #16a34a; }
.k-feed-card__status--link { color: #0284c7; }
.k-feed-card__status--hide { color: #94a3b8; }
.k-feed-card__title {
  margin: 0 0 .4rem !important;
  font-size: 1.08rem !important;
  font-weight: 900 !important;
  font-family: var(--k-display) !important;
  line-height: 1.3 !important;
  text-align: left !important;
}
.k-feed-card__title a {
  color: var(--k-ink) !important;
  text-decoration: none !important;
}
.k-feed-card__title a:hover { color: var(--k-pink-deep) !important; }
.k-feed-card__excerpt {
  font-size: .95rem;
  color: var(--k-ink-soft);
  line-height: 1.55;
  flex: 1;
  margin-bottom: .65rem;
  max-width: 100%;
  width: 100%;
  overflow: visible;
  text-align: left;
}
.k-feed-card__excerpt p { margin: 0 0 .45rem; }
.k-feed-card__excerpt .k-video { margin: .55rem 0 .65rem; }
.k-feed-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  position: relative;
  z-index: 2;
}
.k-feed-card__admin {
  position: relative;
  z-index: 30;
}
.k-feed-card__admin.open,
.k-feed-card__admin .dropdown-menu {
  z-index: 40;
}
.k-feed-card__admin .dropdown-menu {
  border-radius: 12px;
  border: 1px solid #fde68a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
  padding: .35rem 0;
  min-width: 12.5rem;
  /* open upward (dropup) so it fits inside card/column */
  top: auto !important;
  bottom: 100% !important;
  margin: 0 0 .35rem !important;
}
.k-feed-card__admin .dropdown-menu > li > a {
  padding: .45rem .9rem;
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
}

/* Responsive YouTube / video embeds (16:9) — block .k-video after lifting out of TinyMCE wrappers */
.k-video,
body.theme-kids .content_text .k-video,
.k-feed-card__excerpt .k-video {
  display: block !important;
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: .85rem 0 1.1rem;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  clear: both;
}
.k-video iframe,
body.theme-kids .content_text .k-video iframe,
.k-feed-card__excerpt .k-video iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border: 0;
  display: block;
}
/* bare iframes not yet wrapped (fallback) */
body.theme-kids .content_text iframe[src*="youtube"],
body.theme-kids .content_text iframe[src*="youtu.be"],
body.theme-kids .content_text iframe[src*="vimeo"],
body.theme-kids .content_text iframe[src*="rutube"] {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
  display: block;
  margin: .65rem 0 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

/* Search page */
.k-search-page { display: grid; gap: 1rem; }
.k-search-page__head {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #ecfeff, #fdf2f8 55%, #fff7ed);
  border: 2px solid #bae6fd;
}
.k-search-page__title {
  margin: 0 0 .75rem;
  font-size: 1.45rem;
  font-weight: 900;
}
.k-search-page__form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.k-search-page__input {
  flex: 1 1 12rem;
  min-width: 0;
  border: 2px solid #7dd3fc;
  border-radius: 14px;
  padding: .65rem .85rem;
  font-weight: 700;
  font-family: var(--k-font);
  background: #fff;
}
.k-search-page__query {
  margin: .65rem 0 0;
  font-size: .9rem;
  color: #64748b;
  font-weight: 700;
}

/* Ensure content column does not clip dropdowns */
.k-content {
  overflow: visible;
}

.k-cat__empty {
  text-align: center;
  padding: 2.25rem 1.25rem;
  border-radius: var(--k-radius);
  border: 2px dashed #fde68a;
  background: linear-gradient(180deg, #fffbeb, #fff);
}
.k-cat__empty-icon { font-size: 2.4rem; margin-bottom: .5rem; }
.k-cat__empty h2 {
  margin: 0 0 .35rem !important;
  font-weight: 900 !important;
  color: var(--k-ink) !important;
}
.k-cat__empty p { color: var(--k-muted); font-weight: 700; margin: 0 0 1rem; }
.k-cat__pager { margin-top: 1.1rem; text-align: center; }

/* Single article in category */
.k-article-card {
  background: var(--k-card);
  border: 2px solid #fde68a;
  border-radius: var(--k-radius);
  box-shadow: var(--k-shadow-sm);
  padding: 1.15rem 1.25rem 1.35rem;
}
.k-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  font-size: .84rem;
  font-weight: 700;
  color: var(--k-muted);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px dashed #fde68a;
}
.k-article-card__content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--k-ink-soft);
}
.k-article-card__content img { max-width: 100%; height: auto; border-radius: 12px; }
.k-article-card__map { margin-top: 1.25rem; }
.k-map {
  width: 100% !important;
  height: 360px !important;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #fde68a;
}

/* Hide legacy h2 title push when k-cat present */
.theme-kids #forparentssm > .title.tBlue:first-child { display: none; }

@media (max-width: 640px) {
  .k-feed-card { grid-template-columns: 1fr; }
  .k-feed-card__media { min-height: 160px; max-height: 180px; }
  .k-feed-card__media img { min-height: 160px; max-height: 180px; }
  .k-cat__hero { flex-direction: column; align-items: flex-start; text-align: left; }
}
