@font-face {
  font-family: "Bebas Neue";
  src: url("./fonts/BebasNeue-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f172a;
  --danger: #b91c1c;
  --radius: 18px;
  --shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  min-height: 100%;
}
html {
  background: var(--bg);
}
body {
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
body.mobile-ua {
  font-size: 14px;
}
body.with-topbar-offset {
  padding-top: 84px;
}
body.mobile-ua.with-topbar-offset {
  padding-top: 72px;
}
body.has-hero {
  padding-top: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
}
body.mobile-ua .topbar {
  padding: 12px 16px;
}
.home-icon-link {
  width: 54px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  color: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.mobile-ua .home-icon-link {
  width: 44px;
  height: 38px;
}
.home-icon-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.mobile-ua .home-icon-link svg {
  width: 18px;
  height: 18px;
}
.topnav { display: flex; gap: 10px; color: white; align-items: center; }
body.mobile-ua .topnav {
  gap: 8px;
  font-size: 0.92rem;
}
.topnav > a,
.topnav-user {
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  color: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.mobile-ua .topnav > a,
body.mobile-ua .topnav-user {
  min-height: 38px;
  padding: 0 12px;
}
.topnav-user {
  gap: 10px;
  padding: 6px 18px 6px 6px;
}
body.mobile-ua .topnav-user {
  gap: 8px;
  padding: 4px 12px 4px 4px;
}
.topnav-avatar,
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  background: #e2e8f0;
}
body.mobile-ua .topnav-avatar,
body.mobile-ua .user-avatar {
  width: 28px;
  height: 28px;
}
.topnav-avatar-fallback,
.user-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 700;
}
.container, .post-container, .admin-shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto 48px; }
.post-container { width: min(860px, calc(100% - 32px)); }
.narrow { width: min(720px, calc(100% - 32px)); }
body.mobile-ua .container,
body.mobile-ua .admin-shell {
  width: min(1100px, calc(100% - 24px));
  margin-bottom: 36px;
}
body.mobile-ua .post-container {
  width: min(860px, calc(100% - 24px));
  margin-bottom: 36px;
}
body.mobile-ua .narrow {
  width: min(720px, calc(100% - 24px));
  margin-bottom: 36px;
}
.home-container {
  width: min(1180px, calc(100% - clamp(20px, 4vw, 48px)));
  max-width: 1180px;
  margin: 0 auto 64px;
}
body.mobile-ua .home-container {
  width: min(1180px, calc(100% - 24px));
  margin-bottom: 48px;
}

.timeline-home {
  position: relative;
  display: grid;
  gap: 46px;
  width: min(1100px, 100%);
  margin: 52px auto 0;
  padding-left: 0;
}
body.mobile-ua .timeline-home {
  gap: 36px;
  margin-top: 40px;
}
.timeline-home::before {
  display: none;
}
.timeline-year-group {
  position: relative;
  display: block;
  width: min(900px, 100%);
  margin: 0 auto;
  padding-left: 0;
}
.timeline-year-group:not(:first-child) {
  padding-top: 44px;
}
.timeline-year-group:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
}
.timeline-year-group:not(:first-child)::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
}
.timeline-year-header {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}
.timeline-year-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: auto;
  padding: 0;
  margin: 0 0 24px 0;
  background: transparent;
  color: var(--accent);
  font-size: 3.3rem;
  line-height: 0.92;
  letter-spacing: 0.04em;
  font-family: "Bebas Neue", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-weight: 400;
  text-align: center;
}
body.mobile-ua .timeline-year-label {
  font-size: 2.7rem;
}
.timeline-year-button {
  border: none;
  cursor: pointer;
}
.timeline-month-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 8;
  width: 320px;
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}
.timeline-month-year + .timeline-month-year {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.timeline-month-year-label {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 1.1rem;
  font-family: "Bebas Neue", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  letter-spacing: 0.05em;
}
.timeline-month-year.is-current .timeline-month-year-label {
  opacity: 1;
}
.timeline-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.timeline-month-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}
.timeline-month-link:hover {
  background: var(--accent);
  color: white;
}
.timeline-year-posts {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 0;
}
.timeline-item {
  position: relative;
  padding-left: 0;
}
.timeline-item::before {
  display: none;
}
.timeline-date {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 40px;
  padding: 0 18px;
  border-radius: 0;
  background: var(--accent);
  color: white;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
body.mobile-ua .timeline-date {
  min-width: 104px;
  height: 36px;
  padding: 0 14px;
  font-size: 0.95rem;
}
.post-row {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 72px 28px 28px;
  background: var(--panel);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
body.mobile-ua .post-row {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 64px 20px 20px;
}
.post-row.post-row-no-thumb {
  grid-template-columns: minmax(0, 1fr);
}
body.mobile-ua .post-row.post-row-no-thumb {
  grid-template-columns: minmax(0, 1fr);
}
.post-row-body {
  width: 100%;
  max-width: 680px;
  padding-top: 2px;
}
.post-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.post-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.post-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  background: #e2e8f0;
  flex: 0 0 auto;
}
.post-author-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}
.post-author-name {
  font-size: 0.98rem;
}
.post-row-thumb {
  width: 280px;
  height: 220px;
  overflow: hidden;
  background: #dbe4ee;
}
body.mobile-ua .post-row-thumb {
  width: 240px;
  height: 180px;
}
.post-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-row-thumb-placeholder {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}
.post-row h2 {
  margin: 12px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  font-family: Georgia, serif;
}
body.mobile-ua .post-row h2 {
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}
.post-preview {
  margin: 0;
  color: #334155;
  line-height: 1.65;
  font-size: 1.18rem;
}
body.mobile-ua .post-preview {
  font-size: 1.02rem;
}

.hero {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  margin-top: -32px;
  background-color: #374151;
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 124px 20px 40px;
  overflow: hidden;
}
body.mobile-ua .hero {
  min-height: 360px;
  padding: 104px 16px 32px;
}
.hero.hero-no-image {
  background-image: none !important;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.16), transparent 2px),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.2), transparent 1.5px),
    radial-gradient(circle at 62% 34%, rgba(255, 255, 255, 0.12), transparent 1.5px),
    radial-gradient(circle at 38% 14%, rgba(255, 255, 255, 0.14), transparent 1.5px);
  opacity: 0.8;
  pointer-events: none;
}
.hero-meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-stars,
.hero-snow,
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.home-pointer-particle-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
}
.pointer-particle {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  user-select: none;
  will-change: transform, opacity;
  animation: pointer-particle-burst 880ms cubic-bezier(0.16, 0.84, 0.32, 1) forwards;
}
.pointer-particle-circle {
  width: var(--size, 10px);
  height: var(--size, 10px);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--pointer-particle-color) 18%, white) 34%, color-mix(in srgb, var(--pointer-particle-color) 82%, white) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 16px color-mix(in srgb, var(--pointer-particle-color) 36%, rgba(255, 255, 255, 0.35));
}
.pointer-particle-heart,
.pointer-particle-star {
  font-size: var(--size, 16px);
  color: color-mix(in srgb, var(--pointer-particle-color) 62%, white);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.2),
    0 0 20px color-mix(in srgb, var(--pointer-particle-color) 34%, rgba(255, 255, 255, 0.08));
}
@keyframes pointer-particle-burst {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.36) rotate(var(--start-rotate, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(var(--scale, 1)) rotate(var(--end-rotate, 120deg));
  }
}
.meteor {
  --star-size: 16px;
  --meteor-x: -360px;
  --meteor-y: 240px;
  --meteor-rotate: 90deg;
  --trail-length: 120px;
  position: absolute;
  top: 0;
  left: 0;
  width: var(--star-size);
  height: var(--star-size);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.82);
  transform-origin: center center;
  will-change: transform, opacity;
  animation: meteor-fall var(--meteor-duration, 9s) cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
  animation-delay: var(--meteor-delay, 0s);
}
.meteor::before {
  content: "";
  position: absolute;
  left: 48%;
  top: 50%;
  width: var(--trail-length);
  height: calc(var(--star-size) * 0.65);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 244, 206, 0.24) 32%, rgba(255, 255, 255, 0) 100%);
  transform-origin: left center;
  transform: translateY(-50%) rotate(-34deg);
  filter: blur(3px);
  opacity: 0.72;
  z-index: -1;
}
.meteor::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 246, 214, 0.24) 0%, rgba(255, 255, 255, 0.1) 42%, rgba(255, 255, 255, 0) 76%);
  filter: blur(4px);
  z-index: -1;
}
.meteor-star {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 237, 179, 0.92));
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.6),
    0 0 16px rgba(255, 237, 179, 0.26),
    0 0 28px rgba(255, 208, 102, 0.12);
  animation: meteor-spin 2.8s ease-in-out infinite;
}
.meteor-star::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: rgba(255, 255, 255, 0.94);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.72;
}
.meteor-1 {
  top: 6%;
  left: 14%;
  --star-size: 16px;
  --meteor-duration: 10.5s;
  --meteor-delay: 0.8s;
  --meteor-x: -360px;
  --meteor-y: 240px;
  --meteor-rotate: 86deg;
  --trail-length: 126px;
}
.meteor-2 {
  top: 10%;
  left: 32%;
  --star-size: 13px;
  --meteor-duration: 9.4s;
  --meteor-delay: 3.2s;
  --meteor-x: -300px;
  --meteor-y: 210px;
  --meteor-rotate: 74deg;
  --trail-length: 108px;
}
.meteor-3 {
  top: 4%;
  left: 50%;
  --star-size: 18px;
  --meteor-duration: 11.2s;
  --meteor-delay: 5.4s;
  --meteor-x: -410px;
  --meteor-y: 280px;
  --meteor-rotate: 96deg;
  --trail-length: 138px;
}
.meteor-4 {
  top: 12%;
  left: 68%;
  --star-size: 12px;
  --meteor-duration: 8.6s;
  --meteor-delay: 6.6s;
  --meteor-x: -280px;
  --meteor-y: 190px;
  --meteor-rotate: 68deg;
  --trail-length: 96px;
}
.meteor-5 {
  top: 8%;
  left: 86%;
  --star-size: 15px;
  --meteor-duration: 12.6s;
  --meteor-delay: 8.4s;
  --meteor-x: -340px;
  --meteor-y: 230px;
  --meteor-rotate: 82deg;
  --trail-length: 118px;
}
.hero-star,
.snowflake,
.particle {
  position: absolute;
  display: block;
}
.hero-star {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  animation: star-twinkle var(--twinkle-duration, 4s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
}
.hero-star::before,
.hero-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  border-radius: 999px;
}
.hero-star::before {
  width: 1px;
  height: 12px;
}
.hero-star::after {
  width: 12px;
  height: 1px;
}
.snowflake {
  width: var(--flake-size, 8px);
  height: var(--flake-size, 8px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  animation: snow-fall var(--snow-duration, 11s) linear infinite;
  animation-delay: var(--snow-delay, 0s);
}
.particle {
  width: var(--particle-size, 8px);
  height: var(--particle-size, 8px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.52) 0%, rgba(255,244,214,0.22) 42%, rgba(214,194,150,0.1) 68%, rgba(255,255,255,0) 100%);
  filter: blur(var(--particle-blur, 0.6px));
  animation: particle-float var(--particle-duration, 14s) ease-in-out infinite;
  animation-delay: var(--particle-delay, 0s);
  opacity: var(--particle-opacity, 0.55);
}
.s1 { top: 16%; left: 12%; --twinkle-duration: 4.8s; }
.s2 { top: 24%; left: 28%; --twinkle-delay: 1.2s; }
.s3 { top: 14%; left: 42%; --twinkle-duration: 3.8s; }
.s4 { top: 26%; left: 57%; --twinkle-delay: 2.1s; }
.s5 { top: 18%; left: 71%; --twinkle-duration: 5.2s; }
.s6 { top: 12%; left: 84%; --twinkle-delay: 1.8s; }
.s7 { top: 35%; left: 20%; --twinkle-duration: 4.2s; }
.s8 { top: 38%; left: 48%; --twinkle-delay: 2.8s; }
.s9 { top: 32%; left: 67%; --twinkle-duration: 5.5s; }
.s10 { top: 28%; left: 90%; --twinkle-delay: 3.4s; }
.f1 { left: 8%; top: -8%; --flake-size: 7px; --snow-duration: 12s; }
.f2 { left: 18%; top: -10%; --flake-size: 10px; --snow-delay: 1.5s; --snow-duration: 11s; }
.f3 { left: 30%; top: -12%; --flake-size: 6px; --snow-delay: 3.5s; }
.f4 { left: 44%; top: -10%; --flake-size: 9px; --snow-delay: 0.8s; --snow-duration: 13s; }
.f5 { left: 58%; top: -9%; --flake-size: 8px; --snow-delay: 2.4s; }
.f6 { left: 69%; top: -11%; --flake-size: 11px; --snow-delay: 4.1s; --snow-duration: 12.5s; }
.f7 { left: 82%; top: -10%; --flake-size: 7px; --snow-delay: 1.9s; }
.f8 { left: 92%; top: -12%; --flake-size: 9px; --snow-delay: 5s; --snow-duration: 10.5s; }
.p1 { left: 6%; top: 70%; --particle-size: 14px; --particle-duration: 18s; --particle-opacity: 0.45; }
.p2 { left: 11%; top: 38%; --particle-size: 6px; --particle-delay: 1.2s; --particle-duration: 16s; }
.p3 { left: 15%; top: 58%; --particle-size: 9px; --particle-delay: 2.8s; --particle-opacity: 0.4; }
.p4 { left: 19%; top: 80%; --particle-size: 5px; --particle-delay: 0.4s; --particle-duration: 17s; }
.p5 { left: 24%; top: 48%; --particle-size: 12px; --particle-delay: 1.7s; --particle-duration: 20s; --particle-blur: 1px; }
.p6 { left: 28%; top: 64%; --particle-size: 7px; --particle-delay: 3.1s; }
.p7 { left: 33%; top: 34%; --particle-size: 10px; --particle-duration: 15s; --particle-opacity: 0.38; }
.p8 { left: 37%; top: 74%; --particle-size: 6px; --particle-delay: 2.2s; }
.p9 { left: 42%; top: 54%; --particle-size: 11px; --particle-delay: 4.3s; }
.p10 { left: 46%; top: 28%; --particle-size: 5px; --particle-duration: 13.8s; }
.p11 { left: 49%; top: 67%; --particle-size: 16px; --particle-delay: 0.9s; --particle-duration: 22s; --particle-blur: 1.2px; --particle-opacity: 0.32; }
.p12 { left: 53%; top: 44%; --particle-size: 7px; --particle-delay: 3.7s; }
.p13 { left: 57%; top: 83%; --particle-size: 5px; --particle-delay: 1.4s; --particle-duration: 15.8s; }
.p14 { left: 61%; top: 59%; --particle-size: 9px; --particle-delay: 2.5s; --particle-opacity: 0.44; }
.p15 { left: 65%; top: 37%; --particle-size: 13px; --particle-delay: 0.3s; --particle-duration: 19s; --particle-blur: 1px; }
.p16 { left: 69%; top: 72%; --particle-size: 6px; --particle-delay: 4.6s; }
.p17 { left: 73%; top: 49%; --particle-size: 8px; --particle-delay: 2s; }
.p18 { left: 77%; top: 26%; --particle-size: 5px; --particle-delay: 3.4s; --particle-duration: 14.6s; }
.p19 { left: 81%; top: 66%; --particle-size: 12px; --particle-delay: 1.1s; --particle-duration: 18.5s; --particle-opacity: 0.36; }
.p20 { left: 85%; top: 43%; --particle-size: 7px; --particle-delay: 2.9s; }
.p21 { left: 89%; top: 78%; --particle-size: 5px; --particle-delay: 0.8s; --particle-duration: 17.5s; }
.p22 { left: 92%; top: 56%; --particle-size: 10px; --particle-delay: 4.1s; --particle-opacity: 0.4; }
.p23 { left: 95%; top: 32%; --particle-size: 6px; --particle-delay: 2.6s; }
.p24 { left: 97%; top: 69%; --particle-size: 8px; --particle-delay: 5s; --particle-duration: 16.2s; }
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero-inner h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  margin-bottom: 16px;
}
body.mobile-ua .hero-inner h1 {
  font-size: clamp(2.1rem, 8vw, 3.5rem);
}
.hero-inner p {
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  max-width: 720px;
  margin: 0 auto;
}
body.mobile-ua .hero-inner p {
  font-size: clamp(0.92rem, 3.3vw, 1.12rem);
}
@keyframes meteor-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.82);
  }
  8% {
    opacity: 0.96;
  }
  30% {
    opacity: 0;
    transform: translate3d(var(--meteor-x), var(--meteor-y), 0) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--meteor-x), var(--meteor-y), 0) scale(1.02);
  }
}
@keyframes meteor-spin {
  0% {
    transform: rotate(0deg) scale(0.96);
  }
  50% {
    transform: rotate(calc(var(--meteor-rotate) * 0.45)) scale(1.03);
  }
  100% {
    transform: rotate(var(--meteor-rotate)) scale(0.98);
  }
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.18); }
}
@keyframes snow-fall {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: 0.9; }
  100% { transform: translate3d(18px, 520px, 0); opacity: 0.2; }
}
@keyframes particle-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.92); opacity: calc(var(--particle-opacity, 0.55) * 0.55); }
  25% { transform: translate3d(6px, -14px, 0) scale(1.02); opacity: calc(var(--particle-opacity, 0.55) * 0.85); }
  50% { transform: translate3d(-4px, -28px, 0) scale(1.08); opacity: var(--particle-opacity, 0.55); }
  75% { transform: translate3d(8px, -16px, 0) scale(1); opacity: calc(var(--particle-opacity, 0.55) * 0.78); }
}
.meta, .muted { color: var(--muted); }

.empty-state, .panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
body.mobile-ua .empty-state,
body.mobile-ua .panel {
  padding: 22px;
}
.empty-state { text-align: center; margin-top: 40px; }

.post-detail {
  background: var(--panel);
  margin-top: 48px;
  padding: 42px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
body.mobile-ua .post-detail,
body.mobile-ua .post-comments {
  padding: 22px;
}
.post-header-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  margin: 0;
}
.post-header-figure {
  position: relative;
  margin: -42px -42px 26px;
}
body.mobile-ua .post-header-figure {
  margin: -22px -22px 18px;
}
.post-header-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 14px 18px;
  color: white;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.38);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.post-edit-record {
  margin-bottom: 14px;
}
.post-detail h1 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 10px 0 14px;
}
.markdown-body { line-height: 1.9; font-size: 1.04rem; }
.markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body blockquote, .markdown-body pre { margin: 1.2rem 0; }
.markdown-body img { border-radius: 16px; margin: 1.6rem auto; }
.markdown-body blockquote {
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: #f8fafc;
}
.markdown-body a {
  color: var(--accent);
}
.zoomable-image {
  cursor: zoom-in;
}
.article-gallery {
  --gallery-columns: 12;
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: minmax(38px, auto);
  gap: 14px;
  margin: 1.8rem 0;
}
.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #e2e8f0;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}
.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: white;
  background: rgba(15, 23, 42, 0.38);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.lightbox-open {
  overflow: hidden;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-shell {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
}
.lightbox-toolbar {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.lightbox-btn,
.lightbox-close {
  min-width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: white;
  font: inherit;
  cursor: pointer;
}
.lightbox-btn .iconpark-svg,
.lightbox-close .iconpark-svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.lightbox-close {
  justify-self: end;
}
.lightbox-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: auto;
  touch-action: none;
}
.lightbox-image {
  max-width: 96vw;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  transform-origin: center center;
  transition: transform 0.12s ease;
  border-radius: 18px;
}
.lightbox-caption {
  text-align: center;
  color: white;
  font-size: 1rem;
}
.post-comments {
  margin-top: 26px;
  border-radius: 0;
}
.comments-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.comments-head h2 {
  margin: 0;
  font-size: 1.3rem;
}
.comment-form,
.reply-form {
  display: grid;
  gap: 12px;
}
.comment-form label,
.reply-form label {
  gap: 10px;
}
.comment-form-actions {
  display: flex;
  justify-content: flex-end;
}
.comment-login-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 4px;
  flex-wrap: wrap;
}
.comment-list,
.admin-comment-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}
.comment-card,
.admin-comment-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fcfdff;
}
.comment-author-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.comment-body {
  line-height: 1.8;
  color: var(--text);
  word-break: break-word;
}
.comment-actions,
.admin-comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-actions form,
.admin-comment-actions form {
  margin: 0;
}
.reply-box {
  display: grid;
  gap: 10px;
}
.reply-box summary {
  list-style: none;
  margin: 0;
}
.reply-box summary::-webkit-details-marker {
  display: none;
}
.comment-textarea {
  min-height: 108px;
  overflow: hidden;
}
.reply-form .comment-textarea {
  min-height: 84px;
}
.comment-replies,
.admin-comment-replies {
  display: grid;
  gap: 12px;
  margin-left: 24px;
  padding-left: 18px;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}
.reply-card {
  background: white;
}

.flash-stack {
  width: min(1100px, calc(100% - 32px));
  margin: 92px auto 0;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 25;
}
.flash {
  padding: 14px 18px;
  border-radius: 14px;
  background: #e2e8f0;
}
.flash.success { background: #dcfce7; color: #166534; }
.flash.error { background: #fee2e2; color: #991b1b; }

.admin-shell { margin-top: 32px; }
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}
.header-actions, .editor-toolbar, .submit-row, .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
body.mobile-ua .icon-button {
  width: 36px;
  height: 36px;
}
.icon-button svg {
    width: 18px;
    height: 18px;
  }
body.mobile-ua .icon-button svg {
    width: 16px;
    height: 16px;
  }
  .editor-toolbar .icon-button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
.filter-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.filter-tabs a {
  padding: 10px 14px;
  border-radius: 999px;
  background: white;
  color: var(--muted);
}
.filter-tabs a.active { background: var(--accent); color: white; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
}
body.mobile-ua .btn {
  padding: 8px 14px;
}
.btn.small { padding: 8px 12px; font-size: .92rem; }
body.mobile-ua .btn.small {
  padding: 6px 10px;
  font-size: 0.85rem;
}
.btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn.danger { color: white; background: var(--danger); border-color: var(--danger); }

.form-grid { display: grid; gap: 18px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 8px; font-weight: 600; }
input[type="text"], input[type="password"], input[type="datetime-local"], select, textarea, input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: white;
}
body.mobile-ua input[type="text"],
body.mobile-ua input[type="password"],
body.mobile-ua input[type="datetime-local"],
body.mobile-ua select,
body.mobile-ua textarea,
body.mobile-ua input[type="file"] {
  padding: 10px 12px;
}
textarea { resize: vertical; }
.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
}

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-post-list {
  display: grid;
  gap: 16px;
}
.admin-post-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: #fcfdff;
}
.admin-post-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.admin-post-card-head h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.25;
}
.admin-post-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.admin-post-meta-grid div {
  display: grid;
  gap: 4px;
}
.admin-post-meta-grid strong {
  font-size: 1rem;
  line-height: 1.45;
}
.admin-post-actions {
  display: flex;
  width: 100%;
  gap: 8px;
}
.admin-post-actions > a,
.admin-post-actions form {
  flex: 1 1 0;
  margin: 0;
}
.admin-post-actions > a.btn,
.admin-post-actions form > .btn {
  width: 100%;
}

.editor-layout { display: grid; gap: 22px; }
.single-editor { display: grid; gap: 12px; }
.editor-toolbar {
  margin-bottom: 8px;
}
.editor-toolbar .icon-button {
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px;
}
body.mobile-ua .editor-toolbar .icon-button {
  width: auto;
  height: auto;
  padding: 4px;
}
.section-title {
  margin-bottom: 16px;
}
.section-title h2 {
  margin: 0;
  font-size: 1.1rem;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
body.mobile-ua .media-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.media-card,
.media-upload-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fcfdff;
  min-height: 180px;
}
body.mobile-ua .media-card,
body.mobile-ua .media-upload-tile {
  min-height: 160px;
}
.media-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.media-card-cover {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}
.media-card.dragging {
  opacity: 0.5;
}
.media-card.drag-over {
  outline: 2px dashed #94a3b8;
}
.media-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e2e8f0;
}
.media-thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  background: linear-gradient(135deg, #eef2ff, #e2e8f0);
}
.media-card-body {
  display: grid;
  gap: 10px;
  padding: 12px 12px 0;
}
.media-order {
  color: var(--muted);
  font-size: .85rem;
}
.media-title-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}
.media-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px;
}
.media-remove-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.media-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: .92rem;
}
.media-upload-tile {
  display: grid;
  place-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--muted);
}
.media-upload-plus {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
}
.submit-row {
  justify-content: flex-start;
  align-items: center;
}
.autosave-status {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-right: 8px;
  white-space: nowrap;
}
.autosave-status[data-tone="dirty"] {
  color: #b45309;
}
.autosave-status[data-tone="saved"] {
  color: var(--accent);
}
.rich-input {
  min-height: 140px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  line-height: 1.8;
}
body.mobile-ua .rich-input {
  min-height: 120px;
  padding: 12px;
}
.rich-input u { text-decoration-thickness: 1.5px; }
.rich-input:focus { outline: 2px solid var(--accent); }
.hero-preview {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.site-logo-preview {
  width: min(96px, 100%);
  aspect-ratio: 1;
  border-radius: 20px;
  object-fit: contain;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 14px;
  border: 1px solid var(--line);
}
.hero-preview-empty {
  min-height: 220px;
  background: #374151;
}
.site-logo-preview-empty {
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--muted);
}
.theme-swatch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
}
.settings-color-input {
  width: 100%;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
}
.settings-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.settings-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}
.settings-color-input::-moz-color-swatch {
  border: none;
  border-radius: 10px;
}
.login-page {
  background: #0f172a;
}
.login-shell {
  position: relative;
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 3;
  padding: 32px 0 48px;
}
body.mobile-ua .login-shell {
  min-height: calc(100vh - 72px);
  padding: 20px 0 36px;
}
.login-backdrop-base,
.login-backdrop-image,
.login-backdrop-tint {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.login-backdrop-base {
  z-index: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.18), transparent 0 28%),
    radial-gradient(circle at 82% 18%, rgba(148, 163, 184, 0.18), transparent 0 24%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.92) 55%, rgba(51, 65, 85, 0.86));
}
.login-backdrop-image {
  z-index: 1;
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(110%);
  transform: scale(1.08);
  opacity: 0.72;
}
.login-backdrop-tint {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.26), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 38%, rgba(15, 23, 42, 0.38)), rgba(15, 23, 42, 0.46));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.login-panel {
  position: relative;
  z-index: 4;
  width: min(460px, calc(100% - 32px));
  padding: 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  color: white;
}
body.mobile-ua .login-panel {
  width: min(460px, calc(100% - 24px));
  padding: 24px 20px;
  border-radius: 24px;
}
.login-panel-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  text-align: center;
}
.login-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.login-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
}
.login-form {
  gap: 16px;
}
.login-panel label {
  color: rgba(255, 255, 255, 0.92);
}
.login-panel input[type="text"],
.login-panel input[type="password"] {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.login-panel input[type="text"]::placeholder,
.login-panel input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.52);
}
.login-panel .btn.primary {
  width: 100%;
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
}
.user-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.account-list-panel {
  margin-top: 28px;
}
.user-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fcfdff;
  display: grid;
  gap: 14px;
}
.user-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-avatar {
  width: 64px;
  height: 64px;
}

@media (max-width: 760px) {
  .timeline-home {
    gap: 38px;
  }
  .timeline-home::before {
    display: none;
  }
  .timeline-year-group {
    padding-left: 0;
  }
  .timeline-year-label {
    min-width: 0;
    height: auto;
    padding: 0;
  }
  .timeline-year-header {
    margin-bottom: 18px;
  }
  .timeline-month-panel {
    width: min(320px, calc(100vw - 32px));
  }
  .timeline-year-posts {
    padding-left: 0;
  }
  .timeline-item {
    padding-left: 0;
  }
  .timeline-item::before {
    display: none;
  }
  .timeline-date {
    left: 0;
    top: 0;
    min-width: 102px;
    height: 36px;
    padding: 0 14px;
    font-size: 0.96rem;
  }
  .post-row {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: none;
    padding: 60px 18px 18px;
  }
  body.mobile-ua .post-row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 60px 18px 18px;
  }
  .post-row-thumb {
    width: 100%;
    height: 220px;
  }
  body.mobile-ua .post-row-thumb {
    width: 100%;
    height: 220px;
  }
  .article-gallery {
    --gallery-columns: 6;
  }
  .two-col { grid-template-columns: 1fr; }
  .admin-header { flex-direction: column; }
  .post-detail { padding: 26px; }
  .post-comments { padding: 26px; }
  .post-header-figure {
    margin: -26px -26px 22px;
  }
  .comment-replies,
  .admin-comment-replies {
    margin-left: 14px;
    padding-left: 12px;
  }
}
@media (max-width: 560px) {
  .article-gallery {
    --gallery-columns: 1;
  }
  .timeline-home::before {
    left: 20px;
  }
  .timeline-year-group {
    padding-left: 0;
  }
  .timeline-year-label {
    margin-left: 0;
  }
  .timeline-item {
    padding-left: 0;
  }
  .timeline-item::before {
    display: none;
  }
  .timeline-date {
    left: 0;
  }
}

.panel-flat {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.search-form input {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  outline: none;
}
.search-form .btn {
  border-radius: 999px;
}
.search-submit-btn {
  min-width: 48px;
  min-height: 48px;
  padding: 0;
}
.search-submit-btn .iconpark-svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.home-search { margin-top: 28px; }
.admin-search { margin-bottom: 20px; }
.section-title-row { margin-bottom: 18px; }
.pinned-section { margin-top: 24px; }
.pinned-list { display: grid; gap: 24px; }
.pinned-row { border-left: 3px solid var(--accent); }
.post-row-meta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.timeline-item .post-row,
.pinned-row {
  position: relative;
}
.comment-icon-btn,
.comment-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.comment-text-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.02);
}
.comment-icon-btn svg { width: 18px; height: 18px; }
.comment-icon-btn.is-active { color: var(--accent); }
.article-like-bar {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: center;
}
.article-like-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.02);
}
.post-comments {
  margin-top: 32px;
  padding: 42px;
  border: none;
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.comment-card {
  padding: 20px 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fcfdff;
}
.comment-card:first-child {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.reply-card {
  margin-left: 24px;
  padding: 18px 20px;
}
.comment-replies {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.media-panel.is-dragover {
  outline: 2px dashed var(--accent);
  outline-offset: 6px;
}
.media-panel-hint { margin-top: 0; }
.media-status {
  font-size: 0.85rem;
  color: var(--muted);
}
.media-status.is-uploading,
.media-status.is-processing { color: #b45309; }
.media-status.is-failed { color: var(--danger); }
.media-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}
.media-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  transition: width 0.18s ease;
}
.media-card video.media-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #0f172a;
}
body.mobile-ua .media-card video.media-thumb {
  height: 170px;
}
.media-card.is-uploading,
.media-card.is-processing,
.media-card.is-failed { border-color: rgba(15,23,42,.16); }
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.full-row { grid-column: 1 / -1; }
.settings-page-stack {
  display: grid;
  gap: 20px;
}
.settings-card-stack {
  display: grid;
  gap: 20px;
}
.settings-card {
  display: grid;
  gap: 16px;
}
.settings-card > h2 {
  margin: 0;
  font-size: 1.15rem;
}
.settings-card-actions {
  justify-items: start;
}
.storage-status-head {
  display: grid;
  gap: 10px;
}
.settings-storage-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.settings-storage-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.settings-storage-card h3 {
  margin: 0;
  font-size: 1.02rem;
}
.backup-export-status {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.08);
}
.backup-export-status[hidden] {
  display: none !important;
}
.backup-export-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.backup-export-progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}
.backup-export-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  transition: width .2s ease;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 20px;
}
.dashboard-stat-card {
  display: grid;
  gap: 6px;
}
.dashboard-stat-card strong { font-size: 1.6rem; }
.storage-breakdown {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}
.storage-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.storage-bar-segment {
  width: max(var(--segment-width), 8px);
  min-width: 8px;
  background: var(--segment-color);
}
.storage-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
}
.storage-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.storage-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--segment-color);
  flex: 0 0 auto;
}
.storage-legend-label {
  color: var(--text);
}
.danger-zone {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 1));
}
.danger-zone h2 {
  color: #b91c1c;
}
.danger-zone-form {
  display: grid;
  gap: 14px;
}
.danger-zone code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
}
.user-profile-page { margin-top: 110px; display: grid; gap: 20px; }
.user-profile-card { display: grid; gap: 24px; }
.user-profile-head {
  display: flex;
  gap: 20px;
  align-items: center;
}
.profile-avatar {
  width: 96px;
  height: 96px;
}
.user-bio { margin: 10px 0 0; color: var(--muted); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stats-grid div {
  display: grid;
  gap: 6px;
}
.stats-grid strong { font-size: 1.2rem; }
.profile-post-list { display: grid; gap: 18px; }
.profile-post-item { padding-bottom: 18px; border-bottom: 1px solid rgba(15,23,42,.08); }
.post-author[href="#"] { pointer-events: none; }
.admin-comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.gallery-item {
  margin: 0;
  overflow: hidden;
  background: #e2e8f0;
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.gallery-caption,
.post-header-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  color: white;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.gallery-item { position: relative; }
.post-detail { overflow: hidden; border-radius: 0; }
.post-header-figure { position: relative; }
.post-header-image {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}
.lightbox-shell {
  width: min(96vw, 1600px);
  height: min(96vh, 1000px);
}
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-image {
  max-width: 96%;
  max-height: 88vh;
  object-fit: contain;
}
@media (max-width: 760px) {
  .search-form {
    flex-direction: row;
    align-items: center;
  }
  .search-form input {
    min-width: 0;
  }
  .search-submit-btn {
    flex: 0 0 auto;
  }
  .user-profile-head { flex-direction: column; align-items: flex-start; }
  body.mobile-ua .profile-avatar {
    width: 132px;
    height: 132px;
  }
  .admin-post-card {
    padding: 16px;
    border-radius: 18px;
  }
  .admin-post-card-head {
    display: grid;
    gap: 10px;
  }
  .admin-post-card-head h2 {
    font-size: 1.28rem;
  }
  .admin-post-meta-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .post-row-meta-left { flex-direction: column; align-items: flex-start; }
}

.post-action-group {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: white;
}
.post-action-group > a,
.post-action-group > form {
  display: inline-flex;
  align-items: stretch;
  margin: 0;
}
.post-action-group > * + * {
  border-left: 1px solid var(--line);
}
.post-action-group > a.btn,
.post-action-group > form > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
}
.action-icon-btn {
  width: 42px;
}
.action-icon-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.post-action-group .btn.primary {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
}
.post-action-group .btn.dark {
  background: var(--text);
  color: white;
}
.post-action-group .btn.danger {
  background: var(--danger);
  color: white;
}
