/* =========================================================
   Cuddle Bears – stylesheet
   Colours come from CSS variables that are set in the admin (Design & colours).
   ======================================================= */
:root {
  --bg: #F4EAE3;
  --bg-alt: #FBF5EC;
  --surface: #FFFFFF;
  --text: #2E211C;
  --muted: #5A4336;
  --primary: #2E211C;
  --primary-text: #FFFFFF;
  --accent: #D9A066;
  --accent2: #F7C55A;
  --blush: #F2B4A4;
  --link: #7A4A26;
  --chart: #B5651D;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(46, 33, 28, .10);
  --max: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(circle at 10% 0%, var(--bg-alt) 0, transparent 45%), radial-gradient(circle at 100% 30%, rgba(247, 197, 90, .12) 0, transparent 35%);
  background-attachment: fixed;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-round); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; box-shadow: 0 0 0 6px var(--accent2); border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--bg-alt); padding: .1em .35em; border-radius: 6px; word-break: break-all; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--primary); color: var(--primary-text); padding: .75rem 1.25rem; border-radius: 0 0 12px 12px; font-weight: 700;
}
.skip-link:focus { top: 0; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center img { margin: 0 auto 1rem; }
.empty { padding: 2rem; text-align: center; background: var(--surface); border-radius: var(--radius); color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .6rem 1.25rem; border-radius: 999px;
  background: var(--primary); color: var(--primary-text); border: 2px solid var(--primary);
  font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #4A362D; border-color: #4A362D; color: var(--primary-text); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--surface); color: var(--text); }
.btn--accent { background: var(--accent2); border-color: var(--accent2); color: #2E211C; }
.btn--accent:hover { background: #F2B53B; border-color: #F2B53B; color: #2E211C; }
.btn--big { min-height: 52px; padding: .8rem 1.6rem; font-size: 1.08rem; }
.btn--small { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.btn--danger { background: #FFFFFF; color: #9B1C1C; border-color: #9B1C1C; }
.btn--danger:hover { background: #9B1C1C; color: #FFFFFF; border-color: #9B1C1C; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.link-button { background: none; border: 0; padding: .25rem; color: var(--link); text-decoration: underline; cursor: pointer; min-height: 32px; }

/* ---------- Header & navigation ---------- */
.site-header {
  background: rgba(251, 245, 236, .96);
  border-bottom: 3px solid var(--text);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding-top: .6rem; padding-bottom: .6rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-family: var(--font-round); font-weight: 800; font-size: 1.25rem; }
.brand img { width: 48px; height: 48px; }
.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .9rem;
  border: 2px solid var(--text); border-radius: 999px; background: var(--surface); font-weight: 700; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--text); position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.js .site-nav { display: none; }
.site-nav { width: 100%; }
.js .site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: .5rem 0; display: flex; flex-direction: column; gap: .2rem; }
.site-nav a {
  display: block; padding: .6rem .9rem; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { background: var(--primary); color: var(--primary-text); }
.search-form { display: flex; gap: .4rem; padding: .5rem 0 .8rem; }
.search-form input { flex: 1; min-width: 0; min-height: 44px; padding: .5rem .9rem; border: 2px solid var(--text); border-radius: 999px; background: var(--surface); }
.search-form button { min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 2px solid var(--text); background: var(--primary); color: var(--primary-text); font-weight: 700; cursor: pointer; }
.search-form--big { display: block; max-width: 640px; }
.search-form--big label { display: block; font-weight: 700; margin-bottom: .3rem; }

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: flex; align-items: center; width: auto; margin-left: auto; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
  .site-nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; }
  .site-nav a { padding: .45rem .7rem; }
  .search-form { padding: 0; }
  .search-form input { width: 160px; }
}

/* ---------- Page grid with sidebar ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 1.25rem; padding-bottom: 2rem; }
main { min-width: 0; }
main:focus { outline: none; }
@media (min-width: 1100px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .sidebar { position: sticky; top: 90px; }
}
.sidebar { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.widget { background: var(--surface); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); border: 2px solid var(--text); }
.widget__title { font-size: 1.1rem; }
.widget--support { background: var(--bg-alt); }

/* ---------- Notices ---------- */
.notice { padding: .9rem 1.1rem; border-radius: 14px; margin: 0 0 1.25rem; border: 2px solid; background: var(--surface); }
.notice ul { margin: 0; padding-left: 1.2rem; }
.notice--success { border-color: #2F6B3A; background: #EEF8EF; color: #1D4626; }
.notice--error { border-color: #9B1C1C; background: #FDEEEE; color: #7A1414; }
.notice--warning { border-color: #8A5A00; background: #FFF6E0; color: #5C3D00; }
.notice a { color: inherit; font-weight: 700; }

/* ---------- Banners / ads ---------- */
.ad { margin: 1rem auto; text-align: center; max-width: 100%; }
.ad__label { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.ad img { margin: 0 auto; border-radius: 12px; }
.ad a { display: inline-block; }
.ad__code { display: flex; justify-content: center; min-height: 60px; }
.ad__placeholder {
  display: flex !important; align-items: center; justify-content: center; text-align: center;
  min-height: 90px; width: 100%; padding: 1rem; border: 2px dashed var(--muted); border-radius: 14px;
  background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 12px, var(--surface) 12px, var(--surface) 24px);
  color: var(--text); font-weight: 700; text-decoration: none;
}
.ad__placeholder:hover { border-style: solid; }
.ad--header_top .ad__placeholder, .ad--footer_top .ad__placeholder, .ad--content_top .ad__placeholder, .ad--content_bottom .ad__placeholder, .ad--video_below .ad__placeholder { max-width: 728px; margin: 0 auto; }
.ad--sidebar .ad__placeholder { min-height: 250px; }
.ad--in_feed { margin: 0; height: 100%; display: flex; flex-direction: column; }
.ad--in_feed .ad__placeholder, .ad--in_feed .ad__code { flex: 1; min-height: 250px; }
.ad--sticky_mobile { margin: 0; }
.ad--sticky_mobile .ad__label { display: none; }
.ad--sticky_mobile .ad__placeholder { min-height: 50px; padding: .5rem; font-size: .9rem; }
.sticky-ad {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: .4rem 3.4rem .4rem .5rem;
  background: var(--bg-alt); border-top: 3px solid var(--text); box-shadow: 0 -4px 16px rgba(46, 33, 28, .15);
}
.sticky-ad[hidden] { display: none; }
.sticky-ad__close {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--text); background: var(--surface); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
body.has-sticky-ad { padding-bottom: 80px; }
@media (min-width: 768px) { .sticky-ad { display: none; } body.has-sticky-ad { padding-bottom: 0; } }

/* ---------- Hero & sections ---------- */
.hero {
  display: grid; gap: 1.5rem; align-items: center; margin-bottom: 2rem; padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--bg-alt); border: 3px solid var(--text); border-radius: calc(var(--radius) + 10px); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--accent2); opacity: .35; }
.hero__art { width: 160px; margin: 0 auto; position: relative; z-index: 1; }
.hero__text { position: relative; z-index: 1; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
@media (min-width: 720px) { .hero { grid-template-columns: 1fr auto; } .hero__art { width: 220px; } }
.section { margin: 2.5rem 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section__head a { font-weight: 700; }
.band { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; border: 2px solid var(--text); }
.band--warm { background: linear-gradient(135deg, var(--bg-alt), rgba(247, 197, 90, .35)); }
.page-head { margin-bottom: 1.5rem; }

/* ---------- Video grid & cards (9:16) ---------- */
.video-grid { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.video-grid > li { min-width: 0; }
.video-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 2px solid var(--text); height: 100%; display: flex; flex-direction: column; }
.video-card__link { display: block; color: var(--text); text-decoration: none; }
.video-card__link:hover .video-card__title { text-decoration: underline; }
.ratio-9x16 { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; background: var(--bg-alt); overflow: hidden; }
.ratio-9x16 > img, .ratio-9x16 > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-card__play, .player__icon {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(46, 33, 28, .85); border: 3px solid #fff;
}
.video-card__play::after, .player__icon::after {
  content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff;
}
.video-card__title { font-size: .98rem; margin: .7rem .8rem .2rem; font-family: var(--font); font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card__meta { margin: auto .8rem .5rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }
.video-card__meta a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 .2rem; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.ratio-9x16 .badge { position: absolute; top: .5rem; left: .5rem; }
.ratio-9x16 .badge + .badge { top: 2.2rem; }
.badge--sponsored { background: var(--accent2); color: #2E211C; border: 2px solid #2E211C; }
.badge--premium { background: var(--primary); color: var(--primary-text); }

/* ---------- Video page & player ---------- */
.video-page { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .video-page { grid-template-columns: minmax(280px, 420px) 1fr; align-items: start; } }
.player { border-radius: var(--radius); overflow: hidden; border: 3px solid var(--text); box-shadow: var(--shadow); max-width: 420px; margin: 0 auto; background: #000; }
.player__btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.player__btn img { width: 100%; height: 100%; object-fit: cover; }
.player__btn:hover .player__icon { transform: translate(-50%, -50%) scale(1.08); }
.player__icon { width: 76px; height: 76px; transition: transform .15s ease; }
.player__icon::after { border-width: 14px 0 14px 22px; }
.player noscript .btn { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); }
.video-page__title { font-size: clamp(1.4rem, 3vw, 2rem); }
.video-page__desc { overflow-wrap: anywhere; }
.locked { border-radius: var(--radius); border: 3px solid var(--text); max-width: 420px; margin: 0 auto; }
.locked img { filter: blur(12px) brightness(.8); }
.locked__box { position: absolute; inset: auto 1rem 1rem; background: var(--surface); border-radius: var(--radius); padding: 1.1rem; text-align: center; }
.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags a { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: var(--surface); border: 2px solid var(--text); text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.tags a:hover { background: var(--accent2); }
.creator-box { display: flex; gap: .9rem; align-items: center; padding: 1rem; background: var(--surface); border-radius: var(--radius); border: 2px solid var(--text); margin-top: 1rem; }
.creator-box__name { font-size: 1.1rem; margin: 0; }
.creator-box p { margin: 0; }

/* ---------- Stats ---------- */
.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.stats > div { background: var(--bg-alt); border-radius: 14px; padding: .45rem .8rem; min-width: 84px; text-align: center; border: 2px solid rgba(46, 33, 28, .15); }
.stats dt { font-size: .78rem; color: var(--muted); }
.stats dd { margin: 0; font-weight: 800; font-size: 1.15rem; font-family: var(--font-round); }
.stats--big > div { flex: 1; min-width: 120px; padding: 1rem; background: var(--surface); }
.stats--big dd { font-size: 1.8rem; }

/* ---------- Profiles ---------- */
.profile-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.profile-card { background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1rem; text-align: center; box-shadow: var(--shadow); border: 2px solid var(--text); height: 100%; }
.profile-card .stats { justify-content: center; }
.profile-card__name { margin: .6rem 0 0; }
.profile-card__name a { color: var(--text); }
.profile-card__handle { color: var(--muted); margin-bottom: .6rem; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 3px solid var(--text); background: var(--bg-alt); }
.creator-box .avatar { width: 64px; height: 64px; margin: 0; flex: none; }
.avatar--xl { width: 128px; height: 128px; }
.creator-head { display: grid; gap: 1.25rem; align-items: start; margin-bottom: 2rem; background: var(--surface); padding: 1.25rem; border-radius: var(--radius); border: 2px solid var(--text); }
@media (min-width: 640px) { .creator-head { grid-template-columns: auto 1fr; } }
.verified { color: #1D5FA8; }

/* ---------- Cards (deals, downloads) ---------- */
.card-grid { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 2px solid var(--text); height: 100%; display: flex; flex-direction: column; }
.card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-alt); }
.card__body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.card__body .btn { margin-top: auto; }
.card__title { margin-bottom: .3rem; }
.price { font-weight: 800; font-size: 1.15rem; margin-bottom: .4rem; }
.price--big { font-size: 2rem; font-family: var(--font-round); }
.disclosure { font-size: .92rem; padding: .7rem 1rem; background: var(--bg-alt); border-left: 5px solid var(--accent); border-radius: 8px; }
.donate-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.premium-box { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; border: 3px solid var(--text); box-shadow: var(--shadow); max-width: 640px; }

/* ---------- Pagination & breadcrumb ---------- */
.pagination ul { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .3rem .8rem; border-radius: 999px; background: var(--surface); border: 2px solid var(--text); color: var(--text); text-decoration: none; font-weight: 700; }
.pagination a[aria-current="page"] { background: var(--primary); color: var(--primary-text); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .9rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .3rem; color: var(--muted); }
.breadcrumb a[aria-current="page"] { color: var(--text); text-decoration: none; font-weight: 600; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; max-width: 640px; }
.field { display: grid; gap: .3rem; }
.field label, .field .label { font-weight: 700; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .field select, .field textarea, .inline-field input {
  width: 100%; min-height: 46px; padding: .55rem .8rem; border: 2px solid var(--text); border-radius: 12px; background: var(--surface);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input[type="color"] { width: 90px; height: 46px; border: 2px solid var(--text); border-radius: 12px; padding: 2px; background: var(--surface); }
.field [aria-invalid="true"] { border-color: #9B1C1C; box-shadow: 0 0 0 2px #FDEEEE; }
.field__error { color: #9B1C1C; font-weight: 700; margin: 0; }
.req { color: #9B1C1C; }
.inline-field { display: flex; gap: .4rem; flex-wrap: wrap; }
.inline-field input { flex: 1 1 180px; min-width: 0; }
.newsletter-form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 1.5rem; padding: 1rem; background: var(--surface); border-radius: var(--radius); border: 2px solid var(--text); }
.filters .field { min-width: 180px; }
.auth { max-width: 520px; margin: 0 auto; background: var(--surface); padding: clamp(1.25rem, 4vw, 2rem); border-radius: var(--radius); border: 3px solid var(--text); box-shadow: var(--shadow); }
.logout-form { margin-top: 1.5rem; }
.check { display: flex; gap: .6rem; align-items: center; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.check label { font-weight: 600; }
.help { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- Prose ---------- */
.prose { max-width: 75ch; }
.prose h2 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose img { border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: var(--primary-text); margin-top: 2rem; padding-top: 2rem; }
.site-footer a, .site-footer .link-button { color: var(--primary-text); }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer__title { font-size: 1.1rem; color: var(--accent2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; margin-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .25); font-size: .92rem; }
.footer-bottom p { margin: 0; }
.site-footer :focus-visible { outline-color: var(--accent2); box-shadow: none; }

/* ---------- Consent ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 3px solid var(--text); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: 0 10px 40px rgba(46, 33, 28, .3);
}
.consent[hidden] { display: none; }
.consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.maintenance { padding: 4rem 16px; }

/* =========================================================
   Admin
   ======================================================= */
body.admin { background: var(--bg-alt); background-image: none; font-size: 1rem; }
.admin-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem 16px; background: var(--primary); color: var(--primary-text); position: sticky; top: 0; z-index: 50; }
.admin-top .brand { color: var(--primary-text); font-size: 1.05rem; }
.admin-top .brand img { width: 36px; height: 36px; background: #fff; border-radius: 50%; }
.admin-top a, .admin-top .link-button { color: var(--primary-text); }
.admin-top form { margin: 0; }
.admin-top__right { display: flex; gap: 1rem; align-items: center; margin-left: auto; }
.admin-top .nav-toggle { margin-left: 0; background: var(--primary); color: var(--primary-text); border-color: var(--primary-text); }
.admin-top .nav-toggle__bars, .admin-top .nav-toggle__bars::before, .admin-top .nav-toggle__bars::after { background: var(--primary-text); }
.admin-top :focus-visible { outline-color: var(--accent2); box-shadow: none; }
.admin-wrap { display: grid; }
.admin-nav { background: var(--surface); border-right: 2px solid var(--text); padding: .5rem 1rem 2rem; }
.admin-nav__group { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem 0 .2rem; }
.admin-nav ul { padding: 0; }
.admin-nav a { padding: .4rem .7rem; font-weight: 600; }
.admin-main { padding: 1.25rem 16px 4rem; min-width: 0; }
@media (min-width: 1000px) {
  .admin-top .nav-toggle { display: none; }
  .admin-wrap { grid-template-columns: 250px minmax(0, 1fr); }
  .admin-nav, .js .admin-nav { display: block; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; width: auto; margin: 0; }
  .admin-nav ul { flex-direction: column; }
  .admin-main { padding: 1.5rem 2rem 4rem; }
}
.admin-card { background: var(--surface); border: 2px solid var(--text); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.admin-card--hero { background: linear-gradient(135deg, var(--surface), rgba(247, 197, 90, .3)); }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.button-row form { margin: 0; }
.admin-stats { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.admin-stats a { display: block; background: var(--surface); border: 2px solid var(--text); border-radius: 16px; padding: .9rem; text-decoration: none; color: var(--text); height: 100%; }
.admin-stats a:hover { background: var(--bg); }
.admin-stats__value { display: block; font-size: 1.6rem; font-weight: 800; font-family: var(--font-round); }
.admin-stats__label { color: var(--muted); font-size: .9rem; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.admin-search { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.admin-search input, .admin-search select { min-height: 44px; padding: .4rem .7rem; border: 2px solid var(--text); border-radius: 10px; background: var(--surface); }
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 2px solid var(--text); border-radius: 14px; }
.table-wrap table, .trace table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid rgba(46, 33, 28, .15); vertical-align: middle; }
thead th { background: var(--bg-alt); font-size: .85rem; white-space: nowrap; }
tbody th { font-weight: 600; }
tbody tr:hover { background: rgba(247, 197, 90, .12); }
td.actions { white-space: nowrap; }
.inline-form { display: inline; margin: 0; }
.admin-thumb { width: 44px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--text); }
.admin-preview { max-width: 220px; max-height: 220px; border-radius: 10px; border: 2px solid var(--text); }
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #ECE6E2; color: #3B2F2A; }
.pill--ok { background: #DDF0DF; color: #1D4626; }
.pill--error { background: #FBE0E0; color: #7A1414; }
.error-text { color: #9B1C1C; }
.admin-form { max-width: 820px; }
.field--bool { padding: .3rem 0; }
.readonly { margin: 0; padding: .5rem .8rem; background: var(--bg-alt); border-radius: 10px; overflow-wrap: anywhere; }
.tabs ul { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tabs a { display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 2px solid var(--text); text-decoration: none; color: var(--text); font-weight: 600; background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--primary); color: var(--primary-text); }
.bulk-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0; }
.bulk-bar select { min-height: 40px; border: 2px solid var(--text); border-radius: 10px; padding: .3rem .6rem; background: var(--surface); }
.sticky-save { position: sticky; bottom: 0; padding: .8rem 0; background: var(--bg-alt); }
.trace { background: var(--surface); border: 2px solid var(--text); border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1.25rem; }
.trace summary { font-weight: 700; cursor: pointer; }
.copy { user-select: all; }
textarea.mono { font-size: .88rem; line-height: 1.45; }

/* =========================================================
   Version 2: trending hashtags, inline players, rows, battles, statistics
   ======================================================= */
.trend-bar { margin: 0 0 1.5rem; padding: .8rem 1rem; background: var(--surface); border: 2px solid var(--text); border-radius: var(--radius); box-shadow: var(--shadow); }
.trend-bar__title { font-size: 1rem; margin: 0 0 .5rem; }
.trend-bar__list { position: relative; list-style: none; margin: 0; padding: .1rem .1rem .4rem; display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; }
.trend-bar__list li { flex: none; scroll-snap-align: start; }
.trend-tag { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .85rem .3rem .35rem; border-radius: 999px; border: 2px solid var(--text); background: var(--bg-alt); color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.trend-tag:hover { background: var(--accent2); }
.trend-tag__rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--primary-text); font-size: .8rem; }
.trend-tag__count { font-weight: 600; font-size: .8rem; color: var(--muted); }
.section__sub { color: var(--muted); margin-top: -.4rem; }
.small-title { font-size: 1rem; margin: 1rem 0 .5rem; }

/* inline playable cards */
.card-media { display: block; color: inherit; }
.card-media .player__btn { position: absolute; inset: 0; }
.card-media .player__btn:hover .video-card__play { transform: translate(-50%, -50%) scale(1.08); }
.video-card__play { transition: transform .15s ease; }
.card-media.is-playing { background: #000; }
.video-card__title a { color: var(--text); text-decoration: none; }
.video-card__title a:hover { text-decoration: underline; }
.video-card__title a::after { content: ""; }
.video-card__nums { display: inline-flex; gap: .6rem; }

/* horizontal scroll rows */
.video-row { position: relative; overflow-x: auto; margin: 0 -4px 1.5rem; padding: 4px 4px 10px; scroll-snap-type: x proximity; border-radius: var(--radius); }
.video-row__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.video-row__list > li { flex: 0 0 clamp(160px, 42vw, 220px); scroll-snap-align: start; }

/* battles */
.battle { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .6rem; align-items: start; }
.battle__side { min-width: 0; text-align: center; }
.battle__media { border-radius: var(--radius); border: 3px solid var(--text); box-shadow: var(--shadow); max-width: 320px; margin: 0 auto .6rem; }
.battle__vs { align-self: center; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent2); border: 3px solid var(--text); font-weight: 900; font-family: var(--font-round); }
.battle__name { font-weight: 700; margin-bottom: .2rem; overflow-wrap: anywhere; }
.battle__meta { font-size: .88rem; margin-bottom: .6rem; }
.battle__vote { width: 100%; max-width: 320px; }
.battle__title { text-align: center; margin-bottom: 1rem; }
.battle__pct { font-weight: 700; margin-top: .3rem; }
.battle-block { margin-bottom: 1.5rem; }
@media (max-width: 520px) { .battle { gap: .3rem; } .battle__vs { width: 40px; height: 40px; font-size: .85rem; } .battle__vote { padding: .6rem .5rem; font-size: .95rem; } }
.meter { height: 14px; border-radius: 999px; background: var(--bg-alt); border: 2px solid var(--text); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--chart); }

/* public statistics */
.stats--band > div { min-width: 130px; }
.stats-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); margin: 2rem 0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table caption, .bar-table caption { text-align: left; font-weight: 700; padding: .5rem .7rem; }
.stats-grid .bar-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rank { font-weight: 800; width: 3rem; }
.table-video { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 600; }
.table-video:hover span { text-decoration: underline; }
.table-video img { width: 36px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--text); flex: none; }
.bar-cell { position: relative; min-width: 140px; }
.bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--chart); margin-bottom: .2rem; min-width: 2px; }
.bar-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* admin statistics */
.kpi-grid { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpi { background: var(--surface); border: 2px solid var(--text); border-radius: 16px; padding: .9rem 1rem; display: grid; gap: .15rem; }
.kpi__label { color: var(--muted); font-size: .88rem; }
.kpi__value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: .82rem; color: var(--muted); }
.live-card .big-number { font-size: 2rem; font-family: var(--font-round); }
.chart-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin-bottom: 1.5rem; }
.chart-card { margin: 0; background: var(--surface); border: 2px solid var(--text); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.chart-card__title { font-weight: 700; margin-bottom: .5rem; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart__grid { stroke: #E9DED7; stroke-width: 1; }
.chart__base { stroke: #8C7468; stroke-width: 1; }
.chart__axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart__label { fill: var(--text); font-size: 11px; font-weight: 700; font-family: var(--font); }
.chart__hit { fill: transparent; }
.chart__mark { fill: var(--chart); }
.chart__bar:hover .chart__mark { fill: #8F4E14; }
.chart__bar:hover .chart__hit { fill: rgba(46, 33, 28, .05); }
.chart__table { margin-top: .5rem; }
.chart__table summary { cursor: pointer; font-weight: 600; color: var(--link); }
.chart-tip { position: fixed; z-index: 200; pointer-events: none; background: var(--primary); color: var(--primary-text); padding: .35rem .6rem; border-radius: 8px; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); }
.rank-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); margin-bottom: 1.5rem; }
.rank-card { margin: 0; }
.rank-card h3 { font-size: 1.05rem; }
@media (forced-colors: active) { .chart__mark, .bar, .meter span { fill: CanvasText; background: CanvasText; } }

/* =========================================================
   Version 3: likes, hashtags page, home page editor, profile queue
   ======================================================= */
.video-card__meta { flex-wrap: wrap; }
.video-card__views { white-space: nowrap; }
.like-form { margin: 0 0 0 auto; display: inline-flex; }
.like-btn { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; min-width: 44px; padding: .2rem .65rem; border-radius: 999px; border: 2px solid var(--text); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; font-size: .9rem; }
.like-btn__icon { color: #B03A3A; font-size: 1.05em; line-height: 1; }
.like-btn[aria-pressed="true"] { background: #B03A3A; border-color: #B03A3A; color: #fff; }
.like-btn[aria-pressed="true"] .like-btn__icon { color: #fff; }
.like-btn:hover { background: var(--blush); color: var(--text); }
.like-btn[aria-pressed="true"]:hover { background: #8E2D2D; color: #fff; }
.like-btn--big { min-height: 48px; padding: .5rem 1.2rem; font-size: 1.05rem; }
.like-btn.is-pop { transform: scale(1.12); transition: transform .15s ease; }
.trend-bar__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.trend-bar__head a { font-weight: 700; }
.tag-cloud { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-cloud .trend-tag { padding-left: .85rem; }
.letter-nav ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.letter-nav a { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 10px; border: 2px solid var(--text); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 800; }
.letter-nav a:hover { background: var(--accent2); }
.letter-group h2 { font-size: 1.3rem; border-bottom: 2px solid var(--text); padding-bottom: .2rem; }

/* home page editor */
.section-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .8rem; }
.section-item { background: var(--surface); border: 2px solid var(--text); border-radius: var(--radius); padding: .8rem 1rem; }
.section-item.is-hidden { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--bg-alt) 10px, var(--bg-alt) 20px); }
.section-item.is-dragging { opacity: .55; outline: 3px dashed var(--chart); }
.section-item__head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.section-item__title { font-size: 1.05rem; margin: 0; flex: 1 1 220px; }
.section-item__pos { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-text); font-weight: 800; font-size: .85rem; flex: none; }
.drag-handle { cursor: grab; font-size: 1.4rem; line-height: 1; padding: .2rem .3rem; border-radius: 8px; user-select: none; }
.drag-handle:hover { background: var(--bg-alt); }
.section-item__move { display: flex; gap: .3rem; }
.section-item__move button[disabled] { opacity: .4; cursor: default; transform: none; }
.section-item__fields { display: grid; gap: .6rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; margin: .8rem 0 .6rem; }
.field--small input { max-width: 120px; }
.section-item__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.view-switch { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.view-switch legend { font-weight: 700; padding: 0; margin-bottom: .3rem; width: 100%; }
.view-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.view-switch label { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: .3rem .8rem; border: 2px solid var(--text); border-radius: 999px; cursor: pointer; font-weight: 600; background: var(--surface); }
.view-switch input:checked + label { background: var(--primary); color: var(--primary-text); }
.view-switch input:focus-visible + label { outline: 3px solid var(--text); outline-offset: 3px; box-shadow: 0 0 0 6px var(--accent2); }
.is-dirty + .sticky-save .btn, .section-list.is-dirty ~ .sticky-save .btn { box-shadow: 0 0 0 4px var(--accent2); }

/* profiles: add five + queue */
.five-grid { display: grid; gap: .6rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.batch-progress { margin: .6rem 0 1rem; }
.batch-progress progress { width: 100%; height: 14px; accent-color: var(--chart); }
tr.is-working { background: rgba(247, 197, 90, .25); }
tr.is-working th::after { content: " … updating"; font-weight: 400; color: var(--muted); }
tr.is-done { background: rgba(47, 107, 58, .08); }
tr.is-failed { background: #FDEEEE; }
tr.is-failed th::after { content: " – problem, see message above"; font-weight: 400; color: #7A1414; }

/* ---------- Motion & contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .video-card, .card, .widget { border: 2px solid CanvasText; }
}
@media print {
  .site-header, .sidebar, .ad, .site-footer, .sticky-ad, .consent { display: none !important; }
}
