:root {
  --ink: #132238;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #fff;
  --bg: #f5f7fb;
  --blue: #0866d9;
  --navy: #062654;
  --shadow: 0 22px 60px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; font-family: "Trebuchet MS", "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
.container { width: min(100% - 32px, 1180px); margin-inline: auto; }
.container-narrow { width: min(100% - 32px, 760px); }
.container-wide { width: min(100% - 32px, 1120px); }
.section { padding-block: 36px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow { margin: 0 0 6px; color: #2563eb; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.hero { min-height: 560px; display: grid; align-items: center; overflow: hidden; background-position: center; background-size: cover; color: white; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 42px; align-items: center; padding-block: 52px; }
.hero h1 { margin: 0; max-width: 820px; font-size: clamp(2.2rem, 7vw, 5.5rem); line-height: .95; letter-spacing: -.06em; text-wrap: balance; }
.hero-copy > p { max-width: 690px; color: rgba(255,255,255,.9); font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.65; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-badges span { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.12); backdrop-filter: blur(12px); border-radius: 999px; padding: 10px 14px; font-weight: 800; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.hero-stats article { border-radius: 24px; padding: 20px; background: linear-gradient(135deg, #1d7ff0, #2563eb); box-shadow: var(--shadow); transition: transform .18s ease; }
.hero-stats article:hover { transform: scale(1.035); }
.hero-stats article:nth-child(2) { background: linear-gradient(135deg, #fb923c, #db2777); }
.hero-stats article:nth-child(3) { background: linear-gradient(135deg, #22c55e, #059669); }
.hero-stats strong { display: block; font-size: 2.4rem; line-height: 1; }
.hero-stats span { color: rgba(255,255,255,.82); font-size: .88rem; }
.author-card { padding: 22px; border: 1px solid rgba(255,255,255,.24); border-radius: 30px; background: rgba(255,255,255,.12); backdrop-filter: blur(16px); box-shadow: var(--shadow); text-align: center; }
.author-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; background: rgba(0,0,0,.18); }
.author-card img + .author-fallback { display: none; }
.author-fallback { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.08)); color: white; font-size: 4rem; font-weight: 900; }
.author-card h2 { margin: 16px 0 4px; }
.author-card p { margin: 0 0 12px; color: rgba(255,255,255,.78); }
.author-card a { display: inline-block; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; padding: 8px 12px; font-size: .88rem; }

.header-banner { padding: 16px 0; background: rgba(248,250,252,.92); border-bottom: 1px solid var(--line); }
.php-carousel-slide { display: none; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: white; }
.php-carousel-slide.is-active { display: block; animation: fadeUp .45s ease both; }
.php-carousel-slide img { width: 100%; max-height: 260px; object-fit: cover; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.main-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.simple-header { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.nav-row, .simple-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.brand strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; max-width: 360px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav nav, .mini-nav, .footer-nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: #334155; font-size: .92rem; }
.main-nav nav a:hover, .mini-nav a:hover, .back-link:hover { color: var(--blue); }
.muted-link { color: #94a3b8; }
.back-link { color: #0369a1; font-weight: 800; }
.nav-actions { justify-content: flex-end; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; max-width: min(100%, 14rem); }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px; border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; }
.social-link .social-glyph { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.social-link:hover { transform: translateY(-1px); background: #fff; border-color: #bae6fd; }
.social-youtube:hover { color: #ef4444; }
.social-instagram:hover { color: #ec4899; }
.social-tiktok:hover { color: #06b6d4; }
.social-twitter:hover, .social-telegram:hover { color: #0ea5e9; }
.social-facebook:hover, .social-linkedin:hover { color: #2563eb; }
.social-whatsapp:hover { color: #22c55e; }
.social-paypal:hover { color: #003087; }
.social-zelle:hover { color: #6d28d9; }
.nav-pill { font-size: .72rem; font-weight: 800; white-space: nowrap; }
.mini-nav span { color: #64748b; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timeline-card, .panel, .feature-card, .reader-card, .table-card, .match-card, .message-card, .compact-row { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.timeline-card { display: grid; gap: 20px; align-items: center; padding: 24px; margin-bottom: 28px; }
.timeline-card h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.4rem); }
.timeline-line { height: 16px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.timeline-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0ea5e9, #8b5cf6, #f97316); }
.progress-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.progress-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); }
.progress-aside { width: min(100%, 230px); display: grid; justify-items: end; gap: 8px; text-align: right; }
.progress-aside img { width: 176px; height: 80px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #f8fafc; }
.progress-aside p { margin: 0; color: #475569; font-size: .86rem; line-height: 1.35; }
.progress-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.progress-stats article { padding: 12px; border: 1px solid #dbeafe; border-radius: 16px; background: linear-gradient(135deg, #eff6ff, #faf5ff); text-align: center; }
.progress-stats strong { display: block; color: #4f46e5; font-size: clamp(1.25rem, 3vw, 2rem); }
.progress-stats span { display: block; margin-top: 2px; color: #64748b; font-size: .78rem; font-weight: 800; }
.progress-events { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.progress-events span { flex: 0 0 auto; min-width: 96px; max-width: 132px; padding: 8px; border: 1px solid #dbeafe; border-radius: 14px; background: #f8fafc; color: #334155; box-shadow: 0 8px 20px rgba(15,23,42,.04); }
.progress-events span.is-fun { border-color: #e9d5ff; background: #faf5ff; color: #6b21a8; }
.progress-events b, .progress-events small, .progress-events em { display: block; }
.progress-events small { margin-top: 4px; color: #64748b; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.progress-events em { margin-top: 2px; font-size: .78rem; font-style: normal; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marathon-support-card { margin-bottom: 28px; padding: clamp(20px, 3vw, 30px); border-radius: 28px; border: 1px solid #fed7aa; background: linear-gradient(135deg, #fffbeb 0%, #fff 42%, #eff6ff 100%); box-shadow: var(--shadow); }
.marathon-support-card .eyebrow { margin-bottom: 8px; color: #c2410c; }
.marathon-support-card h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.2; color: #0f172a; }
.marathon-support-body { margin: 0; color: #475569; font-size: .95rem; line-height: 1.6; }
.marathon-support-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.marathon-support-link { display: inline-flex; align-items: center; gap: 10px; border-radius: 14px; border: 1px solid #fdba74; background: #fff; padding: 10px 14px; color: #0f172a; font-weight: 800; font-size: .9rem; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.marathon-support-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.1); }
.marathon-support-link-icon { display: flex; flex: 0 0 auto; width: 22px; height: 22px; align-items: center; justify-content: center; color: #c2410c; }
.marathon-support-link-icon .social-glyph { width: 22px; height: 22px; }
.marathon-support-link-label { min-width: 0; }
.panel { padding: clamp(18px, 3vw, 32px); margin-top: 28px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; }
.panel-head span { border-radius: 999px; padding: 5px 10px; background: #e0f2fe; color: #0c4a6e; font-size: .78rem; font-weight: 900; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.section-title h2, .panel h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.section-title p { margin: 8px 0 0; color: var(--muted); }
.section-title a { color: #0369a1; font-weight: 800; }
.section-title.centered { justify-content: center; text-align: center; }
.map-banner { display: block; margin-bottom: 20px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.map-banner img { width: 100%; max-height: 260px; object-fit: cover; }
.stage-legend { margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; background: #f8fafc; }
.stage-legend h3 { margin: 0 0 12px; color: #374151; font-size: .9rem; }
.stage-legend div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; font-size: .78rem; color: #334155; }
.stage-legend span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stage-swatch { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; border: 4px solid #d1d5db; border-radius: 7px; background: white; }
.weekday-row { display: none; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.weekday-row span { padding: 8px 0; color: #4b5563; text-align: center; font-size: .88rem; font-weight: 900; }
.map-banner-grid { display: none; margin: 0; border-radius: 12px; background: #f8fafc; box-shadow: 0 4px 12px rgba(15,23,42,.06); overflow: hidden; min-width: 0; min-height: 0; align-self: stretch; }
/* Сітка днів: обгортка flex + min-h-0, всередині relative h-full — висота комірки = висота day-card у тому ж рядку */
.map-banner-grid-inner { position: relative; flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; overflow: hidden; border-radius: inherit; }
.map-banner-grid-inner img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; min-height: 0; object-fit: cover; object-position: center; }
.map-banner-mobile { margin: 16px 0 0; border-radius: 12px; }

.day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.day-card { position: relative; aspect-ratio: 1; min-height: 104px; overflow: visible; border: 3px solid #cbd5e1; border-radius: 12px; padding: 12px; background: white; color: #64748b; cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.day-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15,23,42,.16); }
.day-label { position: absolute; z-index: 10; top: 8px; left: 8px; opacity: .62; font-weight: 800; font-size: .62rem; }
.day-main { position: relative; z-index: 10; display: flex; height: 100%; min-height: 0; flex-direction: column; align-items: center; justify-content: center; padding: 20px 0; text-align: center; }
.day-main strong { display: block; color: #64748b; font-size: clamp(1.875rem, 3.2vw, 3rem); font-weight: 900; line-height: 1; }
.day-date { display: block; margin-top: 4px; max-width: 100%; overflow: hidden; opacity: .68; font-size: .69rem; font-weight: 800; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.day-location { position: absolute; z-index: 20; left: 8px; right: 8px; bottom: 8px; display: -webkit-box; overflow: hidden; border-radius: 8px; padding: 5px 7px; background: rgba(255,255,255,.24); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-style: normal; font-size: .62rem; font-weight: 900; line-height: 1.12; text-align: center; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.day-location.is-fun { background: rgba(243,232,255,.86); color: #7e22ce; }
.day-watermark { position: absolute; inset: 0; z-index: 0; display: grid; min-width: 0; min-height: 0; gap: 4px; padding: 12px; opacity: .22; pointer-events: none; }
.day-watermark.sponsor-count-1 { place-items: center; }
.day-watermark.sponsor-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.day-watermark.sponsor-count-3, .day-watermark.sponsor-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.day-watermark.sponsor-count-3 .day-watermark-cell:first-child { grid-column: 1 / -1; }
.day-watermark-cell { display: flex; min-width: 0; min-height: 0; align-items: center; justify-content: center; overflow: hidden; }
.day-watermark img { width: 90%; height: 90%; max-width: 100%; max-height: 100%; object-fit: contain; }
.day-watermark.sponsor-count-1 img { width: 92%; height: 92%; }
.day-watermark-text { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; overflow: hidden; font-size: clamp(1.8rem, 4vw, 4.8rem); font-weight: 900; line-height: .9; overflow-wrap: anywhere; text-align: center; }
.day-watermark.sponsor-count-2 .day-watermark-text { font-size: clamp(1.5rem, 3vw, 3rem); }
.day-watermark.sponsor-count-3 .day-watermark-text, .day-watermark.sponsor-count-4 .day-watermark-text { font-size: clamp(1.25rem, 2.4vw, 2.5rem); }
.day-match-flags { position: absolute; z-index: 20; top: -8px; left: 50%; display: inline-flex; align-items: center; gap: 2px; transform: translateX(-50%); border-radius: 999px; padding: 3px 7px; background: rgba(255,255,255,.92); box-shadow: 0 10px 20px rgba(15,23,42,.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .95rem; line-height: 1; white-space: nowrap; }
.day-match-flag { position: absolute; z-index: 20; top: -8px; left: -8px; filter: drop-shadow(0 8px 10px rgba(15,23,42,.2)); font-size: 1.7rem; line-height: 1; }
.day-fun-badge { position: absolute; z-index: 20; top: -8px; left: 50%; transform: translateX(-50%); border-radius: 999px; padding: 4px 8px; background: rgba(168,85,247,.92); box-shadow: 0 10px 20px rgba(88,28,135,.2); color: white; font-size: .58rem; font-weight: 900; line-height: 1; white-space: nowrap; }
.day-status-icon { position: absolute; z-index: 20; right: 8px; bottom: 8px; display: flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 999px; background: #e5e7eb; color: #9ca3af; font-size: .86rem; font-weight: 900; line-height: 1; }
.day-status-icon:empty { display: none; }
.day-status-icon.is-locked:empty { display: flex; }
.day-status-icon.is-locked::before { content: ""; position: absolute; left: 7px; top: 11px; width: 8px; height: 7px; border: 2px solid currentColor; border-radius: 2px; }
.day-status-icon.is-locked::after { content: ""; position: absolute; left: 8px; top: 6px; width: 6px; height: 7px; border: 2px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; }
.day-status-icon.is-match { top: 8px; bottom: auto; }
.day-current-dot { position: absolute; z-index: 20; top: -8px; right: -8px; width: 20px; height: 20px; border: 2px solid white; border-radius: 999px; background: #facc15; box-shadow: 0 8px 18px rgba(15,23,42,.18); }
.day-card.is-complete { color: white; border-color: #22c55e; background: linear-gradient(135deg, #4ade80, #10b981); }
.day-card.is-current { color: white; border-color: #2563eb; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.day-card.is-complete .day-main strong, .day-card.is-current .day-main strong { color: white; }
.day-card.is-complete .day-label, .day-card.is-current .day-label, .day-card.is-complete .day-date, .day-card.is-current .day-date { opacity: .9; }
.day-card.is-complete .day-status-icon, .day-card.is-current .day-status-icon { background: rgba(255,255,255,.28); color: white; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stage-neutral { border-color: #d1d5db; background: white; color: #64748b; }
.stage-blue { border-color: #3b82f6; background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.stage-green { border-color: #22c55e; background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #15803d; }
.stage-yellow { border-color: #eab308; background: linear-gradient(135deg, #fef9c3, #fde68a); color: #854d0e; }
.stage-orange { border-color: #f97316; background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #c2410c; }
.stage-red { border-color: #ef4444; background: linear-gradient(135deg, #fee2e2, #fecaca); color: #b91c1c; }
.stage-purple { border-color: #a855f7; background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; }
.stage-gold { border-color: #f59e0b; background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; }

@media (min-width: 640px) {
  .day-card { min-height: 124px; border-width: 4px; border-radius: 16px; padding: 16px; }
  .day-label { top: 12px; left: 12px; font-size: .875rem; }
  .day-date { margin-top: 7px; font-size: .875rem; }
  .day-location { left: 12px; right: 12px; bottom: 12px; border-radius: 10px; padding: 6px 8px; font-size: .75rem; }
  .day-watermark { padding: 16px; }
  .day-match-flags { top: -10px; padding: 4px 9px; font-size: 1.12rem; }
  .day-match-flag { top: -12px; left: -12px; font-size: 2.25rem; }
  .day-fun-badge { top: -10px; padding: 5px 12px; font-size: .75rem; }
  .day-status-icon { right: 12px; bottom: 12px; width: 32px; height: 32px; font-size: 1rem; }
  .day-status-icon.is-locked::before { left: 10px; top: 15px; width: 10px; height: 9px; }
  .day-status-icon.is-locked::after { left: 11px; top: 9px; width: 8px; height: 9px; }
  .day-status-icon.is-match { top: 12px; }
}

@media (min-width: 768px) {
  /* md+ як HomePage: перший рядок — банер (4 колонки) + три day-card; зовнішній рядок — flex column, внутрішній блок тягнеться на всю висоту рядка */
  .map-banner-grid { display: flex; flex-direction: column; grid-column: span 4; grid-row: 1; }
  .map-banner-grid-inner { min-height: 124px; }
  .map-banner-mobile { display: none; }
}

@media (min-width: 1024px) {
  .map-banner-grid-inner { min-height: 140px; }
  .weekday-row { display: grid; }
  .day-card { min-height: 140px; padding: 24px; }
  .day-main strong { font-size: 3rem; }
}

.feature-grid, .news-grid, .sponsor-grid, .stats-grid, .group-grid { display: grid; gap: 18px; }
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
.feature-card { display: flex; flex-direction: column; padding: 24px; min-height: 180px; transition: .22s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: #bae6fd; box-shadow: 0 18px 42px rgba(15,23,42,.12); }
.feature-card span { font-size: 2rem; }
.feature-card p, .news-card p { color: var(--muted); line-height: 1.55; }
.feature-card p { flex: 1; }
.feature-card b { margin-top: 12px; color: #0369a1; font-size: .9rem; }
.feature-card:nth-child(1):hover { border-color: #fcd34d; }
.feature-card:nth-child(1) b { color: #a16207; }
.feature-card:nth-child(2):hover { border-color: #6ee7b7; }
.feature-card:nth-child(2) b { color: #047857; }
.feature-card:nth-child(3):hover { border-color: #c4b5fd; }
.feature-card:nth-child(3) b { color: #6d28d9; }
.news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-card, .news-list-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 34px rgba(15,23,42,.08); transition: .2s ease; }
.news-card img { width: 100%; height: 190px; object-fit: cover; background: #e2e8f0; }
.news-card div { padding: 18px; }
.news-card small, .news-list-card small { color: var(--muted); }
.news-list-card { display: flex; gap: 18px; padding: 14px; align-items: center; }
.news-list-card img { width: 132px; height: 92px; object-fit: cover; border-radius: 16px; }
.news-list-card span { display: grid; gap: 8px; }
.list-stack { display: grid; gap: 14px; }

.about-card { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; margin-top: 28px; padding: clamp(22px, 4vw, 46px); border-radius: 32px; color: white; background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777); box-shadow: var(--shadow); }
.about-card h2 { margin-top: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.about-card p { line-height: 1.65; color: rgba(255,255,255,.92); }
.about-card img { border-radius: 24px; box-shadow: 0 22px 50px rgba(0,0,0,.22); }
.about-donate { margin: 20px 0 8px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.about-donate-title { margin: 0 0 12px; font-size: 1.05rem; font-weight: 900; color: #fff; }
.about-donate-row { display: flex; flex-wrap: wrap; gap: 12px; }
.about-donate-link { display: inline-flex; align-items: center; gap: 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); padding: 12px 14px; color: #fff; text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.about-donate-link:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); }
.about-donate-link span:last-child { display: grid; gap: 2px; }
.about-donate-link strong { font-size: .88rem; font-weight: 900; color: #fff; }
.about-donate-link small { color: rgba(255,255,255,.88); font-size: .78rem; font-weight: 700; word-break: break-all; }
.about-donate-icon { display: flex; flex: 0 0 auto; width: 28px; height: 28px; align-items: center; justify-content: center; color: #fff; }
.about-donate-icon .social-glyph { width: 26px; height: 26px; }
.about-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.about-features article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: start; border-radius: 14px; padding: 14px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.about-features span { grid-row: span 2; margin-top: 2px; font-weight: 900; }
.about-features strong { display: block; color: white; font-size: 1rem; }
.about-features small { display: block; color: rgba(255,255,255,.8); line-height: 1.35; }
.sponsor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sponsor-card { min-height: 150px; display: grid; place-items: center; gap: 7px; padding: 18px; border-radius: 20px; background: #f8fafc; transition: .2s ease; text-align: center; }
.sponsor-card:hover { background: #eef2ff; }
.sponsor-card img { max-height: 76px; object-fit: contain; }
.sponsor-card > span { font-size: 3rem; line-height: 1; }
.sponsor-card small { color: var(--muted); }

.article-page h1, .section > h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 24px; letter-spacing: -.03em; }
.article-poster { width: 100%; max-height: 460px; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 28px; }
.rich-html { max-width: 100%; overflow-x: auto; line-height: 1.7; color: #243244; }
.rich-html p { margin: 1em 0; }
.rich-html h2 { font-size: 1.6rem; margin-top: 1.5em; }
.rich-html h3 { font-size: 1.25rem; margin-top: 1.35em; }
.rich-html a { color: #0369a1; text-decoration: underline; }
.rich-html img { border-radius: 16px; margin: 16px 0; }
.rich-html table, table { width: 100%; border-collapse: collapse; }
.rich-html th, .rich-html td, th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.rich-html th, th { background: #f8fafc; color: #334155; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: white; }
.group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px; }
.table-card { padding: 20px; }
.table-card h2 { margin-top: 0; }

.reader-card { max-width: 480px; margin: 26px auto; padding: 24px; }
.reader-head { display: flex; gap: 12px; align-items: flex-start; }
.reader-head > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; background: #e0f2fe; color: var(--navy); font-weight: 900; }
.reader-card h2 { margin: 0 0 4px; }
.reader-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.reader-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 6px; margin: 18px 0; border-radius: 16px; background: #f1f5f9; }
.reader-tabs button { border: 0; border-radius: 12px; padding: 10px; background: transparent; cursor: pointer; color: #64748b; font-weight: 800; }
.reader-tabs button.is-active { background: white; color: var(--ink); box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.reader-form { display: grid; gap: 14px; }
.reader-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 800; }
.reader-form input { width: 100%; border: 1px solid #cbd5e1; border-radius: 14px; padding: 12px 14px; background: #fff; }
.is-hidden { display: none !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 14px; padding: 10px 16px; border: 1px solid transparent; cursor: pointer; font-weight: 900; }
.btn-primary { background: var(--navy); color: white; }
.btn-outline { background: white; border-color: #cbd5e1; color: #334155; }
.form-status { min-height: 20px; color: #b91c1c; font-size: .9rem; }
.reader-pill { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); background: #f8fafc; border-radius: 16px; padding: 10px 14px; margin: 20px 0; }
.link-button { border: 0; background: transparent; color: #0369a1; cursor: pointer; font-weight: 900; padding: 0; }

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0; }
.stats-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 26px rgba(15,23,42,.06); }
.stats-grid small { display: block; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.stats-grid strong { display: block; margin-top: 8px; font-size: clamp(1.3rem, 3vw, 2rem); overflow-wrap: anywhere; }
.positive { color: #047857; }
.negative { color: #be123c; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: .78rem; font-weight: 900; border: 1px solid var(--line); }
.status-win { color: #065f46; background: #d1fae5; }
.status-lose { color: #9f1239; background: #ffe4e6; }
.status-pending { color: #92400e; background: #fef3c7; }
.status-refund { color: #475569; background: #f1f5f9; }
.empty-note { margin: 22px 0; border: 1px dashed #cbd5e1; background: #f8fafc; border-radius: 18px; padding: 22px; color: var(--muted); text-align: center; }
.bets-mobile-list { display: none; gap: 12px; }
.bet-mobile-card { display: grid; gap: 10px; border: 1px solid #e5e7eb; border-radius: 18px; padding: 16px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.bet-mobile-card > div, .bet-mobile-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bet-mobile-card small { color: #64748b; font-weight: 800; }
.bet-mobile-card h2 { margin: 0; color: #111827; font-size: 1rem; }
.bet-mobile-card p { margin: 0; color: #374151; font-size: .92rem; }
.bet-mobile-card footer { border-top: 1px solid #f1f5f9; padding-top: 8px; }
.bet-mobile-card footer span { min-width: 0; overflow: hidden; color: #374151; text-overflow: ellipsis; white-space: nowrap; }
.bet-mobile-card footer strong { font-size: 1.15rem; }

.scoreboard { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 30px 0; padding: 26px; border-radius: 28px; color: white; background: radial-gradient(circle at top left, #16834f, #0a4d2e 45%, #06291d); box-shadow: inset 0 0 60px rgba(0,0,0,.28), var(--shadow); }
.scoreboard small { color: rgba(255,255,255,.75); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.scoreboard h2 { margin: 4px 0 0; }
.score { display: flex; align-items: center; gap: 24px; }
.score span { text-align: center; }
.score strong { display: block; font-size: 3.4rem; line-height: 1; }
.score b { font-size: 2.4rem; color: rgba(255,255,255,.6); }
.match-stack { display: grid; gap: 18px; }
.match-card { padding: 22px; }
.match-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.match-head h3 { margin: 6px 0; }
.match-head h3 span { color: #94a3b8; font-weight: 400; }
.match-head p, .match-head small { color: var(--muted); }
.vote-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
.vote-btn { border: 2px solid var(--line); border-radius: 18px; padding: 18px; background: #f8fafc; cursor: pointer; font-weight: 900; }
.vote-btn:not(:disabled):hover, .vote-btn.is-picked { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.vote-btn:disabled { opacity: .65; cursor: not-allowed; }
.poll-bars { display: grid; gap: 7px; color: var(--muted); font-size: .9rem; }
.poll-bars div { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.poll-bars i { display: block; height: 100%; background: linear-gradient(90deg, #0ea5e9, #8b5cf6); border-radius: inherit; }
.raffle-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 18px; background: #fdf2f8; border: 1px solid #fbcfe8; color: #831843; }

.account-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.message-card, .compact-row { padding: 16px; box-shadow: none; }
.message-card.unread { border-color: #bae6fd; background: #f0f9ff; }
.message-card small, .compact-row span { display: block; color: var(--muted); margin-top: 4px; }
.task-stack { display: grid; gap: 14px; }
.task-day { border: 1px solid var(--line); background: #f8fafc; border-radius: 18px; padding: 16px; }
.task-day h3 { margin: 0 0 12px; }
.task-day h3 small { color: var(--muted); font-weight: 400; }
.task-day label { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.task-day input { margin-top: 4px; }

.day-modal[hidden] { display: none; }
.day-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.day-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.day-modal-card { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; max-width: 48rem; max-height: 100dvh; overflow: hidden; border-radius: 24px 24px 0 0; background: white; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); animation: modalSlideUp .22s ease both; }
.day-modal-card header { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 16px; padding-right: 56px; color: white; background: linear-gradient(90deg, #3b82f6, #9333ea); }
.day-modal-card header > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.day-modal-card header strong { flex: 0 0 auto; font-size: 2.25rem; line-height: 1; font-weight: 900; opacity: .9; }
.day-modal-card header b, .day-modal-card header small { display: block; }
.day-modal-card header b { font-size: 1.5rem; line-height: 1.1; }
.day-modal-card header small { margin-top: 4px; color: rgba(255,255,255,.9); font-size: 1rem; }
.day-modal-card header button { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; border: 0; width: 40px; height: 40px; border-radius: 999px; background: transparent; color: white; font-size: 1.65rem; cursor: pointer; transition: background .18s ease; }
.day-modal-card header button:hover { background: rgba(255,255,255,.2); }
.day-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-block { border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 24px; background: #f8fafc; }
@keyframes modalSlideUp { from { opacity: .92; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.modal-block h3 { margin-top: 0; }
.pill { display: inline-flex; border-radius: 999px; padding: 7px 12px; background: #eef2ff; color: #3730a3; font-weight: 900; }
.modal-location { margin: 0 0 14px; color: var(--muted); font-weight: 800; }
.modal-match { border: 2px solid #e9d5ff; background: linear-gradient(135deg, #eff6ff, #faf5ff, #fdf2f8); text-align: center; }
.modal-match strong { display: block; font-size: 1.25rem; color: #1f2937; }
.modal-match small { display: block; margin-top: 10px; border-radius: 12px; padding: 9px; background: rgba(255,255,255,.72); color: #64748b; font-weight: 900; text-transform: uppercase; font-size: .72rem; }
.modal-partners { border-color: #fed7aa; background: linear-gradient(135deg, #fffbeb, #fff, #ffedd5); }
.modal-sponsors { display: grid; grid-template-columns: 1fr; gap: 12px; min-width: 0; width: 100%; }
.modal-sponsors.sponsor-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-sponsors a, .modal-sponsors > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 92px; border-radius: 14px; background: rgba(255,255,255,.86); border: 1px solid rgba(251,191,36,.7); text-align: center; padding: 12px 8px; box-shadow: 0 2px 10px rgba(15,23,42,.04); transition: border-color .18s ease, box-shadow .18s ease; }
.modal-sponsors a:hover { border-color: rgba(251,146,60,.95); box-shadow: 0 8px 22px rgba(251,146,60,.14); }
.modal-sponsors img { width: 100%; max-width: 10rem; max-height: 6rem; object-fit: contain; }
.modal-sponsors.sponsor-count-2 img { max-width: 6.5rem; max-height: 4rem; }
.modal-sponsors.sponsor-count-3 img { max-width: 5rem; max-height: 3rem; }
.modal-sponsors.sponsor-count-4 img { max-width: 4rem; max-height: 2.5rem; }
.modal-sponsors span { font-size: 2rem; line-height: 1; }
.modal-sponsors.sponsor-count-1 span { font-size: 3.5rem; }
.modal-sponsors.sponsor-count-2 span { font-size: 3rem; }
.modal-sponsors.sponsor-count-3 span { font-size: 2.4rem; }
.modal-sponsors small { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); font-weight: 800; }
.modal-fun { border-color: #e9d5ff; background: linear-gradient(135deg, #faf5ff, #fff, #fdf4ff); }
.modal-fun h3 span { display: inline-flex; border-radius: 999px; padding: 4px 9px; background: #a855f7; color: #fff; font-size: .75rem; }
.modal-fun img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.day-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #020617; overflow: hidden; }
iframe.day-video, .day-video iframe { width: 100%; height: 100%; display: block; }
.modal-link { color: #0369a1; text-decoration: underline; overflow-wrap: anywhere; }
.modal-socials { display: grid; gap: 9px; }
.modal-socials a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid #fbcfe8; border-radius: 14px; background: linear-gradient(90deg, #fdf2f8, #faf5ff); font-weight: 900; color: #831843; }
.task-failed { color: #9f1239; }
.day-modal-card header.is-complete { background: linear-gradient(135deg, #22c55e, #059669); }
.day-modal-card footer { padding: 16px 20px; border-top: 1px solid var(--line); background: #f8fafc; }
.day-modal-card footer button { width: 100%; min-height: 46px; border: 0; border-radius: 16px; background: linear-gradient(135deg, #22c55e, #059669); color: white; font-weight: 900; cursor: pointer; }
.modal-open { overflow: hidden; }

.cooperation-cta { border-block: 1px solid #e0f2fe; background: linear-gradient(135deg, rgba(240,249,255,.92), #fff, #f8fafc); }
.cooperation-cta .container { padding-block: 40px; }
.cooperation-card { max-width: 42rem; margin: 0 auto; text-align: center; }
.cooperation-card h2, .feedback-section h2 { margin: 0; color: #0f172a; font-size: clamp(1.35rem, 3vw, 2rem); }
.cooperation-card p { color: #475569; line-height: 1.65; }
.cooperation-card .btn { margin-top: 14px; border-radius: 999px; background: #0284c7; }
.feedback-section { border-top: 1px solid #e5e7eb; background: linear-gradient(180deg, #f8fafc, #fff); padding-block: 44px; }
.feedback-form { display: grid; gap: 18px; margin: 28px auto 0; max-width: 36rem; }
.feedback-form label { display: grid; gap: 7px; color: #334155; font-weight: 800; }
.feedback-form input, .feedback-form textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; padding: 12px 14px; background: white; color: #0f172a; }
.feedback-form textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.feedback-check { display: grid; gap: 8px; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px; background: rgba(248,250,252,.82); }
.feedback-check input { max-width: 140px; }
.feedback-check small { color: #64748b; }
.feedback-form .btn { width: fit-content; }
.hp-field { position: absolute; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }

@media (min-width: 640px) {
  .day-modal { align-items: center; padding: 16px; }
  .day-modal-card { max-height: 90vh; border-radius: 24px; animation-name: modalPop; }
  .day-modal-card header { gap: 16px; padding: 24px; padding-right: 64px; }
  .day-modal-card header > div { gap: 16px; }
  .day-modal-card header strong { font-size: 3.75rem; }
  .day-modal-card header b { font-size: 1.875rem; }
  .day-modal-card header small { font-size: 1.125rem; }
  .day-modal-card header button { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 1.85rem; }
  .day-modal-body { padding: 24px; }
  .day-modal-card footer { padding: 24px; }
  .modal-block { border-radius: 20px; padding: 20px; }
  .modal-sponsors.sponsor-count-1 { display: flex; justify-content: center; }
  .modal-sponsors.sponsor-count-1 a, .modal-sponsors.sponsor-count-1 > div { width: 100%; max-width: 28rem; }
  .modal-sponsors.sponsor-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-sponsors.sponsor-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-sponsors.sponsor-count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal-sponsors.sponsor-count-1 img { max-width: 12rem; max-height: 7rem; }
}

@keyframes modalPop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.site-footer { margin-top: 44px; background: #0f172a; color: #cbd5e1; }
.footer-grid { display: flex; justify-content: space-between; gap: 28px; padding-block: 42px; }
.footer-title { color: white; font-weight: 900; margin: 0 0 6px; }
.footer-nav a:hover { color: white; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); background: #eef2f7; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-right: 1px solid var(--line); background: #fff; }
.admin-brand { padding: 10px 8px 16px; border-bottom: 1px solid var(--line); }
.admin-brand strong, .admin-brand small, .admin-brand em { display: block; }
.admin-brand small { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.admin-brand strong { margin-top: 4px; font-size: 1.1rem; }
.admin-brand em { margin-top: 8px; color: #64748b; font-size: .72rem; font-style: normal; }
.admin-sidebar nav { display: grid; gap: 6px; overflow: auto; }
.admin-sidebar a, .admin-sidebar button { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; background: transparent; color: #475569; text-align: left; cursor: pointer; font-weight: 800; }
.admin-sidebar a:hover, .admin-sidebar button:hover { background: #f1f5f9; color: #0f172a; }
.admin-sidebar a.is-active { background: #0f172a; color: #fff; }
.admin-main { min-width: 0; padding: clamp(16px, 3vw, 32px); }
.admin-main > h1 { margin-top: 0; font-size: clamp(2rem, 4vw, 3rem); }
.admin-card { margin: 18px 0; padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.admin-form { display: grid; gap: 14px; max-width: 900px; }
.admin-form label, .admin-search { display: grid; gap: 6px; font-weight: 800; color: #334155; }
.admin-form input, .admin-form textarea, .admin-form select, .admin-search input, .admin-table input, .admin-table select { width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; background: #fff; color: #0f172a; }
.admin-form textarea { resize: vertical; font-family: inherit; }
.admin-form h2 { margin: 16px 0 0; }
.admin-form h3 { margin: 10px 0 0; }
.admin-form .check-row { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.admin-form .check-row input { width: auto; }
.admin-search { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: 16px; }
.admin-table table { min-width: 900px; }
.admin-table .btn { min-height: 34px; padding: 7px 10px; font-size: .86rem; }
.admin-two-col, .admin-three-col { display: grid; gap: 12px; }
.admin-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-subcard { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; }
.admin-repeat { display: grid; gap: 12px; }
.admin-repeat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #f8fafc; }
.admin-repeat-row-social, .admin-repeat-row-sponsors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-repeat-row-support-pay { grid-template-columns: 72px minmax(130px, 160px) minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; }
.admin-repeat-row-support-pay label { margin: 0; display: grid; gap: 6px; }
.admin-repeat-row-banners { grid-template-columns: 1.5fr 1fr 1fr 90px 120px; }
.admin-repeat-row-wide { grid-template-columns: 90px 80px repeat(8, minmax(100px, 1fr)); overflow-x: auto; }
.admin-tournament-row { display: grid; grid-template-columns: minmax(120px, 1fr) 70px 18px 70px minmax(120px, 1fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.admin-tournament-row span:last-child { text-align: right; }
.media-field { display: grid; gap: 8px; min-width: 0; }
.media-field label { min-width: 0; }
.media-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.media-tools .btn, .media-picker-toolbar .btn { min-height: 38px; padding: 9px 12px; font-size: .86rem; }
.media-upload-control { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.media-upload-control input { display: none; }
.media-preview { display: grid; place-items: center; min-height: 76px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; overflow: hidden; color: var(--muted); font-size: .84rem; text-align: center; }
.media-preview img { width: 100%; max-height: 96px; object-fit: contain; padding: 8px; }
.admin-repeat-row .media-preview { min-height: 56px; }
.admin-repeat-row .media-preview img { max-height: 72px; }
.media-status { min-height: 16px; color: #047857; font-weight: 700; }
.media-status.is-error, .form-status.is-error { color: #b91c1c; }
.media-picker[hidden] { display: none; }
.media-picker { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.media-picker-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.media-picker-card { position: relative; z-index: 1; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; width: min(960px, 100%); max-height: min(86vh, 760px); overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 25px 70px rgba(15,23,42,.28); }
.media-picker-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f8fafc, #fff); }
.media-picker-card header small { display: block; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.media-picker-card header strong { display: block; color: #0f172a; font-size: 1.35rem; }
.media-picker-card header button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: #f1f5f9; color: #0f172a; font-size: 1.6rem; cursor: pointer; }
.media-picker-toolbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; min-height: 180px; overflow: auto; padding: 18px 20px; background: #f8fafc; }
.media-picker-grid .muted { grid-column: 1 / -1; margin: 0; }
.media-tile { display: grid; gap: 7px; min-width: 0; border: 1px solid #dbe3ef; border-radius: 16px; padding: 8px; background: #fff; color: #0f172a; text-align: left; cursor: pointer; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.media-tile:hover { border-color: #38bdf8; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(2,132,199,.14); }
.media-tile img { width: 100%; height: 92px; object-fit: contain; border-radius: 12px; background: #f1f5f9; }
.media-tile span { overflow: hidden; color: #334155; font-size: .82rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.media-tile small { color: var(--muted); font-size: .74rem; }
.media-picker-card > .form-status { margin: 0; padding: 12px 20px; background: #fff; }
.media-picker-open { overflow: hidden; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .hero { min-height: 650px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 11rem; gap: 16px; align-items: start; padding-block: 40px; }
  .author-card { width: 11rem; padding: 12px; border-radius: 24px; }
  .author-card img, .author-fallback { border-radius: 16px; }
  .author-card h2 { font-size: .82rem; line-height: 1.15; }
  .author-card p { font-size: .72rem; line-height: 1.25; }
  .author-card a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; }
  .day-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feature-grid, .news-grid, .sponsor-grid, .stats-grid, .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-card { grid-template-columns: 1fr; }
  .nav-row { align-items: flex-start; flex-direction: column; }
  .timeline-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container, .container-narrow, .container-wide { width: min(100% - 22px, 1180px); }
  .section { padding-block: 24px; }
  .hero { min-height: 720px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 9.5rem; gap: 12px; padding-block: 32px; }
  .hero h1 { font-size: clamp(1.5rem, 8vw, 2.2rem); line-height: 1.08; letter-spacing: -.035em; }
  .hero-copy > p { margin-top: 8px; font-size: .88rem; line-height: 1.45; }
  .hero-badges { display: grid; grid-template-columns: 1fr; }
  .hero-badges span { width: 100%; padding: 8px 12px; font-size: .78rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 10px; }
  .hero-stats article { padding: 16px; border-radius: 18px; }
  .hero-stats strong { font-size: 2rem; }
  .author-card { display: block; width: 9.5rem; text-align: center; padding: 10px; border-radius: 22px; }
  .author-card img, .author-fallback { border-radius: 16px; }
  .author-fallback { font-size: 2rem; }
  .author-card h2 { margin: 10px 0 4px; font-size: .72rem; }
  .author-card a { display: block; padding: 6px 8px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { max-width: 260px; white-space: normal; }
  .main-nav nav, .mini-nav { gap: 10px; font-size: .86rem; }
  .day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .day-card { min-height: 104px; border-width: 3px; border-radius: 12px; padding: 12px; }
  .progress-head { flex-direction: column; }
  .progress-aside { width: 100%; justify-items: stretch; text-align: left; }
  .progress-aside img { width: 100%; height: 120px; }
  .progress-stats { grid-template-columns: 1fr; }
  .progress-events span { min-width: 110px; }
  .stage-legend div { grid-template-columns: 1fr; }
  .stage-legend { padding: 12px; }
  .feature-grid, .news-grid, .sponsor-grid, .stats-grid, .group-grid, .account-stats { grid-template-columns: 1fr; }
  .news-list-card { align-items: stretch; flex-direction: column; }
  .news-list-card img { width: 100%; height: 180px; }
  .about-card { padding: 22px; border-radius: 24px; }
  .about-features { grid-template-columns: 1fr; }
  .feedback-form .btn { width: 100%; }
  .scoreboard, .match-head, .footer-grid, .reader-pill { align-items: stretch; flex-direction: column; }
  .score { justify-content: center; }
  .vote-row { grid-template-columns: 1fr; }
  .bets-desktop { display: none; }
  .bets-mobile-list { display: grid; }
  .table-scroll table { min-width: 720px; }
  .admin-sidebar nav { grid-template-columns: 1fr; }
  .admin-two-col, .admin-three-col, .admin-repeat-row, .admin-repeat-row-social, .admin-repeat-row-sponsors, .admin-repeat-row-support-pay, .admin-repeat-row-banners, .admin-repeat-row-wide { grid-template-columns: 1fr; }
  .admin-card { padding: 16px; border-radius: 20px; }
  .media-tools, .media-picker-toolbar { display: grid; grid-template-columns: 1fr; }
  .media-tools .btn, .media-picker-toolbar .btn { width: 100%; }
  .media-picker { align-items: end; padding: 0; }
  .media-picker-card { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; }
  .media-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .admin-tournament-row { grid-template-columns: 1fr 64px 14px 64px 1fr; font-size: .86rem; }
  .day-modal { align-items: flex-end; }
  .day-modal-card { width: 100%; border-radius: 24px 24px 0 0; }
  .modal-sponsors:not(.sponsor-count-4) { grid-template-columns: 1fr; }
  .modal-sponsors.sponsor-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 420px) and (max-width: 640px) {
  .day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-list-card { align-items: center; flex-direction: row; }
  .news-list-card img { width: 96px; height: 80px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nav-row { align-items: center; flex-direction: row; }
}

@media (max-width: 767px) {
  .nav-row { align-items: flex-start; flex-direction: column; }
  .nav-actions { width: 100%; justify-content: space-between; gap: 10px; }
}
