/* Fonts loaded via <link> in HTML head to avoid render-blocking @import chain */

:root {
  --gold: #c9a84c;
  --gold-rgb: 201, 168, 76;
  --gold-light: #e8d48b;
  --dark: #1a1a2e;
  --dark2: #16213e;
  --ink: #253046;
  --surface: #ffffff;
  --surface-soft: #f5f5f5;
  --surface-muted: #eef1f6;
  --border: rgba(26, 26, 46, 0.1);
  --success: #1f8a57;
  --error: #c24b48;
  --shadow: 0 20px 60px rgba(14, 22, 38, 0.12);
  --shadow-soft: 0 8px 24px rgba(14, 22, 38, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --page-gutter: 10px;
  --page-offset: -10px;
  --page-bleed: 20px;
  --page-width: calc(100vw - 20px);
  --font-display: "Amiri", "Noto Naskh Arabic", serif;
  --font-body: "Noto Naskh Arabic", "Calibri", sans-serif;
  --pattern-opacity: 0.12;
  --anim-duration: 0.5s;
  --anim-stagger: 0.08s;
  --anim-total-budget: 1.5s;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
}

.pattern-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none' stroke='%23c9a84c' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 6l6 9 9 6-9 6-6 9-6-9-9-6 9-6 6-9zm-21 3h12v12H9zm30 0h12v12H39zM9 39h12v12H9zm30 0h12v12H39zM24 0h12v12H24zM24 48h12v12H24zM0 24h12v12H0zM48 24h12v12H48z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 60px 60px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  background: linear-gradient(180deg, #f7f7f9 0%, #edf2f7 100%);
  color: var(--ink);
}

body.is-locked {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.site-shell {
  width: min(100%, var(--page-width));
  margin: 0 auto;
}

.site-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 55%, #0f3460 100%);
  color: #fff;
  padding: 20px 0 66px;
}

.site-hero--compact {
  padding-top: 14px;
  padding-bottom: 18px;
}

.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(201, 168, 76, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 28%);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo img {
  height: 60px;
  width: auto;
  display: block;
}

.site-hero--compact .donate-btn {
  min-height: 44px;
  padding: 0 18px;
  gap: 6px;
  font-size: 13px;
  flex-shrink: 0;
}

.site-hero--compact .topbar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.donate-btn,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.inline-action,
.lightbox-close {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), background 0.2s ease, color 0.2s ease;
}

.donate-btn,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  font-weight: 700;
  max-width: 100%;
}

.donate-btn,
.primary-button {
  background: linear-gradient(135deg, #e9bb7d, #d4a56a);
  color: var(--dark);
  box-shadow: 0 10px 24px rgba(201, 168, 76, 0.28);
}

.secondary-button,
.ghost-button,
.inline-action {
  background: rgba(22, 33, 62, 0.08);
  color: var(--dark);
}

.danger-button {
  background: rgba(194, 75, 72, 0.12);
  color: var(--error);
}

.donate-btn {
  position: relative;
  overflow: visible;
}

.site-hero--compact .donate-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.4), rgba(var(--gold-rgb), 0.1), rgba(var(--gold-rgb), 0.35));
  background-size: 200% 200%;
  z-index: -1;
  animation: donate-glow 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes donate-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); background-position: 0% 50%; }
  25% { opacity: 0.8; transform: scale(1.04); }
  50% { opacity: 1; transform: scale(1.1); background-position: 100% 50%; }
  75% { opacity: 0.7; transform: scale(1.06); }
}

.donate-btn:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover,
.inline-action:hover,
.lightbox-close:hover {
  transform: translateY(-2px) scale(1.02);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.95rem;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 1px;
  background: currentColor;
}

.section-header h2,
.section-header h3,
.admin-title {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.2;
}

.page-main,
.admin-main {
  padding-bottom: 40px;
}

.page-main {
  margin-top: 12px;
  overflow-x: clip;
}

.admin-main {
  margin-top: 0;
  overflow-x: clip;
}

.stack-layout {
  display: grid;
  gap: 18px;
}

.panel-card,
.admin-card,
.admin-section {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.panel-card {
  padding: 18px 16px;
  position: relative;
}

#newsSection.panel-card {
  overflow: hidden;
  background:
    radial-gradient(ellipse at top right, rgba(var(--gold-rgb), 0.06), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(22, 33, 62, 0.03), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
}

#newsSection.panel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none' stroke='%23c9a84c' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 6l6 9 9 6-9 6-6 9-6-9-9-6 9-6 6-9zm-21 3h12v12H9zm30 0h12v12H39zM9 39h12v12H9zm30 0h12v12H39zM24 0h12v12H24zM24 48h12v12H24zM0 24h12v12H0zM48 24h12v12H48z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 60px 60px;
  opacity: var(--pattern-opacity);
  pointer-events: none;
  border-radius: inherit;
}

#newsSection .section-header,
#newsSection .news-grid,
#newsSection .notice,
#newsSection .empty-news-state {
  position: relative;
  z-index: 1;
}

.panel-card--media {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.section-header p,
.muted-text,
.hint-text {
  margin: 0;
  color: #607089;
}

.hero-stage {
  display: grid;
  gap: 12px;
}

.hero-frame {
  position: relative;
  display: grid;
  width: 100vw;
  margin-inline-start: calc(-50vw + 50%);
  aspect-ratio: 16 / 9;
  min-height: clamp(220px, 68vw, 360px);
}

.hero-frame.is-video {
  width: 100vw;
  margin-inline-start: calc(-50vw + 50%);
  min-height: auto;
  aspect-ratio: auto;
}

.hero-frame-media {
  display: grid;
  width: 100%;
  min-height: inherit;
}

.hero-frame-media > .media-shell,
.hero-frame-media > .hero-placeholder {
  width: 100%;
  min-height: inherit;
}

.hero-skeleton,
.hero-placeholder,
.admin-preview-empty,
.empty-news-state {
  border: 1px dashed rgba(var(--gold-rgb), 0.24);
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(var(--gold-rgb), 0.22) 0%,
    rgba(var(--gold-rgb), 0.09) 44%,
    rgba(22, 33, 62, 0.05) 100%
  );
}

.hero-skeleton {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  border-radius: 0;
}

.hero-skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 18%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(var(--gold-rgb), 0.18) 68%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
  will-change: transform;
}

.hero-placeholder,
.admin-preview-empty,
.empty-news-state {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px 20px;
  text-align: center;
}

.hero-placeholder {
  height: 100%;
  min-height: 100%;
  border-radius: 0;
}

.admin-preview-empty,
.empty-news-state {
  min-height: 240px;
}

.hero-placeholder img,
.admin-preview-empty img {
  width: 80px;
}

.media-shell,
.admin-media-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
  min-height: 220px;
}

.panel-card--media .notice {
  margin: 0 var(--page-gutter);
}

.panel-card--media .media-shell {
  min-height: inherit;
  border-radius: 0;
}

.hero-media-asset,
.admin-preview img,
.admin-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media-asset {
  min-height: 100%;
  max-height: none;
}

.hero-media-video {
  object-fit: contain;
  background: #111827;
  min-height: auto;
  height: auto;
  max-height: 92vh;
  width: 100%;
}

.video-fallback {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 32px;
  color: #fff;
  text-decoration: none;
}

.video-fallback img {
  width: 86px;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(201, 168, 76, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.08) 0%, rgba(6, 10, 18, 0) 34%, rgba(6, 10, 18, 0.32) 100%);
}

.video-mute-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  box-shadow: 0 14px 26px rgba(3, 8, 16, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

html[dir="rtl"] .video-mute-btn {
  right: auto;
  left: 16px;
  top: 16px;
}

.video-mute-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 18px 30px rgba(3, 8, 16, 0.34);
}

.video-mute-btn:active {
  transform: scale(0.9);
}

.video-mute-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-buffer-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--gold);
  border-right-color: #d8bc69;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: spin 0.85s linear infinite;
  transition: opacity 0.2s ease;
}

.video-overlay.is-buffering .video-buffer-spinner {
  opacity: 1;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  display: none;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecd081, var(--gold));
  color: #182033;
  box-shadow: 0 18px 38px rgba(201, 168, 76, 0.34);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.video-play-btn::before {
  content: "";
  margin-inline-start: 4px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent currentColor;
}

.video-play-btn:active {
  transform: translate(-50%, -50%) scale(0.9);
}

.video-overlay.is-reduced-motion .video-mute-btn {
  display: none;
}

.video-overlay.is-reduced-motion:not(.has-started) .video-play-btn {
  display: grid;
}

.fade-media {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.fade-media.is-loaded {
  opacity: 1;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.news-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  text-align: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring);
}

.news-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(var(--gold-rgb), 0.08);
  pointer-events: none;
  z-index: 3;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--gold-rgb), 0.12);
}

.news-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.16), rgba(22, 33, 62, 0.08));
}

.news-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.12) 55%, rgba(17, 24, 39, 0.64) 100%);
  z-index: 1;
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-card-caption {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px 14px 12px;
  color: #fff;
}

.news-card-caption strong,
.news-card-caption span {
  display: block;
}

.news-card-caption span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.notice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: rgba(22, 33, 62, 0.06);
  color: var(--dark);
}

.notice[data-kind="success"] {
  background: rgba(31, 138, 87, 0.1);
  color: var(--success);
}

.notice[data-kind="error"] {
  background: rgba(194, 75, 72, 0.1);
  color: var(--error);
}

.notice button {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(10px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-dialog {
  position: relative;
  width: min(100%, 980px);
  display: grid;
  gap: 12px;
  transition: transform 250ms ease, opacity 250ms ease;
  will-change: transform, opacity;
}

.lightbox-dialog--dragging {
  transition: none;
}

.lightbox-dialog--closing {
  transform: translateY(100%) !important;
  opacity: 0 !important;
  transition: transform 250ms ease, opacity 250ms ease;
}

.lightbox-frame {
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 82vh;
}

.lightbox-frame img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.site-footer {
  position: relative;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 45%, #0a1628 100%);
  color: #fff;
  padding: 48px 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none' stroke='%23ffffff' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 6l6 9 9 6-9 6-6 9-6-9-9-6 9-6 6-9zm-21 3h12v12H9zm30 0h12v12H39zM9 39h12v12H9zm30 0h12v12H39zM24 0h12v12H24zM24 48h12v12H24zM0 24h12v12H0zM48 24h12v12H48z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 60px 60px;
  opacity: 0.05;
  pointer-events: none;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-sub {
  margin: 8px 0 20px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.03em;
}

.social-links {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  margin-top: 4px;
}

.social-links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 60%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.4), transparent);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: transform 0.18s ease, background 0.18s ease, filter 0.18s ease;
}

.social-link:hover {
  transform: translateY(-2px) scale(1.08);
  background: rgba(var(--gold-rgb), 0.2);
  color: var(--gold-light);
  filter: none;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.55);
}

.admin-main {
  padding-top: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.admin-card,
.admin-section {
  padding: 18px 16px;
}

.analytics-section {
  display: grid;
  gap: 22px;
  margin-bottom: 18px;
}

.analytics-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.analytics-card,
.analytics-table-card,
.analytics-empty-state {
  border: 1px solid rgba(26, 26, 46, 0.1);
  border-radius: 20px;
}

.analytics-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.12), rgba(22, 33, 62, 0.04));
}

.analytics-card span {
  color: #607089;
  font-weight: 700;
}

.analytics-card strong {
  color: var(--dark);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1;
}

.analytics-empty-state {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(22, 33, 62, 0.04);
}

.analytics-empty-state strong {
  color: var(--dark);
}

.analytics-empty-state span {
  color: #607089;
}

.analytics-tables {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.analytics-table-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  max-width: 100%;
}

.analytics-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.analytics-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(26, 26, 46, 0.08);
  text-align: right;
}

.analytics-table th {
  color: #607089;
  font-size: 0.92rem;
}

.analytics-table td {
  color: var(--dark);
}

.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.analytics-table .is-empty-row td {
  color: #607089;
  text-align: center;
}

.admin-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-nav-links {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #607089;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.admin-nav-link:hover {
  background: rgba(22, 33, 62, 0.06);
  color: var(--dark);
}

.admin-nav-link.is-active {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.08));
  color: var(--dark);
}

.chart-card {
  border: 1px solid rgba(26, 26, 46, 0.1);
  border-radius: 20px;
  padding: 18px;
  padding-bottom: 24px;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.chart-card .section-header {
  margin-bottom: 14px;
}

.chart-container {
  width: 100%;
}

.chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-container svg text {
  font-family: var(--font-body);
  fill: #607089;
}

.chart-container svg .chart-bar {
  transition: opacity 0.18s ease;
}

.chart-container svg .chart-bar:hover {
  opacity: 0.82;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: #607089;
  font-weight: 600;
}

.panel-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.stack-form {
  display: grid;
  gap: 14px;
  width: 100%;
}

.field-label {
  display: grid;
  gap: 8px;
  width: 100%;
}

.field-label span {
  font-weight: 700;
  color: var(--dark);
}

.field-label input,
.inline-edit-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(26, 26, 46, 0.12);
  border-radius: 14px;
  background: #fff;
}

.field-label input:focus,
.inline-edit-form input:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.14);
}

.button-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
}

.file-chip,
.order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(22, 33, 62, 0.07);
  color: #516075;
  max-width: 100%;
}

.progress-wrap {
  position: relative;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 33, 62, 0.08);
  margin: 12px 0 10px;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold), #f0c66c);
  transition: width 0.2s ease;
}

.admin-preview {
  min-height: 220px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface-muted);
}

.admin-preview video {
  aspect-ratio: 16 / 9;
}

.news-admin-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.news-admin-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(26, 26, 46, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.news-admin-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.news-admin-content {
  display: grid;
  gap: 12px;
}

.news-admin-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
}

.news-admin-top h4 {
  margin: 0;
  font-size: 1.05rem;
}

.news-admin-top p {
  margin: 4px 0 0;
  color: #607089;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
}

.inline-edit-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(22, 33, 62, 0.04);
}

.inline-edit-form .button-row {
  margin-top: 2px;
}

.compact-form {
  padding-bottom: 0;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes entrance-fade-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.animate-in {
  opacity: 0;
  animation: entrance-fade-rise var(--anim-duration) var(--ease-entrance) both;
  animation-play-state: paused;
}

.page-ready .animate-in {
  animation-play-state: running;
}

.stagger-1 { animation-delay: 0s; }
.stagger-2 { animation-delay: 0.08s; }
.stagger-3 { animation-delay: 0.16s; }
.stagger-4 { animation-delay: 0.24s; }
.stagger-5 { animation-delay: 0.32s; }
.stagger-6 { animation-delay: 0.4s; }
.stagger-7 { animation-delay: 0.48s; }
.stagger-8 { animation-delay: 0.56s; }

.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
}

.scroll-reveal.is-revealed {
  animation: entrance-fade-rise var(--anim-duration) var(--ease-entrance) both;
}

.bfcache-restored .animate-in,
.bfcache-restored .scroll-reveal {
  animation: none;
  opacity: 1;
  transform: none;
}

@media (max-width: 399px) {
  #newsSection.panel-card::after,
  .site-footer::after {
    opacity: 0.06;
  }
}

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

@media (min-width: 480px) {
  :root {
    --page-gutter: 14px;
    --page-offset: -14px;
    --page-bleed: 28px;
    --page-width: calc(100vw - 28px);
  }

  .site-hero {
    padding-bottom: 72px;
  }

  .site-hero--compact {
    padding-top: 15px;
    padding-bottom: 22px;
  }


  .brand-logo img {
    height: 65px;
    width: auto;
  }

  .site-hero--compact .donate-btn {
    min-height: 46px;
    padding: 0 20px;
    gap: 8px;
    font-size: 14px;
  }


  .stack-layout {
    gap: 20px;
  }

  .panel-card,
  .admin-card,
  .admin-section {
    padding: 20px;
  }

  .panel-card--media {
    padding: 0;
  }

  .hero-frame {
    min-height: clamp(250px, 62vw, 420px);
  }

  .notice {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .notice button {
    align-self: auto;
  }

  .button-row {
    flex-direction: row;
    align-items: center;
  }

  .analytics-summary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-dialog {
    gap: 10px;
  }
}

@media (min-width: 768px) {
  :root {
    --page-gutter: 24px;
    --page-offset: -24px;
    --page-bleed: 48px;
    --page-width: calc(100vw - 48px);
  }

  .site-hero {
    padding: 22px 0 80px;
  }

  .site-hero--compact {
    padding-bottom: 28px;
  }

  .topbar,
  .panel-toolbar,
  .news-admin-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand-logo img {
    height: 70px;
  }

  .page-main,
  .admin-main {
    padding-bottom: 48px;
  }

  .admin-main {
    margin-top: 0;
    padding-top: 20px;
  }

  .chart-card {
    padding: 20px;
  }

  .stack-layout {
    gap: 32px;
  }

  .panel-card,
  .admin-card,
  .admin-section {
    padding: 24px;
    border-radius: var(--radius-lg);
  }

  .panel-card--media {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .panel-card--media .notice {
    margin: 0;
  }

  .hero-stage {
    gap: 16px;
  }

  .hero-frame {
    width: 100vw;
    margin-inline-start: calc(-50vw + 50%);
    aspect-ratio: auto;
    min-height: min(68vh, 520px);
  }

  .hero-skeleton,
  .hero-placeholder,
  .panel-card--media .media-shell {
    border-radius: 0;
  }

  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .news-card-caption {
    padding: 18px 16px 14px;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .analytics-tables {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .analytics-table-card {
    padding: 18px;
  }

  .news-admin-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .news-admin-card img {
    width: 112px;
    height: 112px;
    aspect-ratio: auto;
  }

  .site-hero--compact .donate-btn {
    min-height: 48px;
    padding: 0 22px;
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  :root {
    --page-gutter: 36px;
    --page-offset: -36px;
    --page-bleed: 72px;
    --page-width: min(1120px, calc(100vw - 72px));
  }

  .stack-layout {
    gap: 48px;
  }

  .panel-card {
    padding: 26px;
  }

  .panel-card--media {
    padding: 0;
  }

  .hero-frame {
    width: 100vw;
    margin-inline-start: calc(-50vw + 50%);
    min-height: min(68vh, 560px);
  }

  .lightbox {
    padding: 24px;
  }

  .lightbox-dialog {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-in, .scroll-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .site-hero--compact .donate-btn::after {
    animation: none;
  }
}

@media (hover: none) {
  .news-card,
  .donate-btn,
  .primary-button,
  .social-link,
  .lightbox-close {
    transition: transform 0.1s ease, filter 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  }

  .news-card:active {
    transform: scale(0.97);
    box-shadow: 0 10px 20px rgba(14, 22, 38, 0.1);
  }

  .donate-btn:active,
  .primary-button:active {
    transform: scale(0.96);
    filter: brightness(0.92);
  }

  .social-link:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.18);
  }

  .lightbox-close:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.22);
  }
}
