/* ManimaTV — component styles (plain CSS on top of css/tailwind.css). Colours only via tokens. */
/* Inside a cascade layer so Tailwind utilities (layer "utilities") can override these. */
@layer components {

/* ---------- script-aware typography ---------- */
[lang="or"] { font-family: "Noto Sans Oriya", Inter, system-ui, sans-serif; }
[lang="hi"] { font-family: "Noto Sans Devanagari", Inter, system-ui, sans-serif; }
[lang="en"] { font-family: Inter, system-ui, "Segoe UI", Roboto, sans-serif; }
html[lang="or"] h1, html[lang="or"] h2, html[lang="or"] h3,
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3,
[lang="or"] .article-title, [lang="hi"] .article-title { line-height: 1.45; }
.line-clamp-2, .line-clamp-3, .line-clamp-4 { overflow-wrap: anywhere; padding-block: 0.06em; }
html[lang="or"] .line-clamp-2, html[lang="or"] .line-clamp-3, html[lang="or"] .line-clamp-4,
html[lang="hi"] .line-clamp-2, html[lang="hi"] .line-clamp-3, html[lang="hi"] .line-clamp-4 { line-height: 1.55; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: rgb(var(--brand-red)); color: rgb(var(--brand-paper));
  padding: .6rem 1rem; font-weight: 700; border-radius: 4px;
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: .95rem; line-height: 1.2;
  padding: .7rem 1.25rem; border-radius: 4px; border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap; text-decoration: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-primary { background: rgb(var(--brand-red)); color: rgb(var(--brand-paper)); }
.btn-primary:hover:not(:disabled) { background: rgb(var(--brand-teal)); }
.dark .btn-primary:hover:not(:disabled) { background: rgb(var(--brand-paper)); color: rgb(var(--brand-ink)); }
.btn-secondary { background: rgb(var(--brand-teal)); color: rgb(var(--brand-paper)); }
.btn-secondary:hover:not(:disabled) { background: rgb(var(--brand-ink)); }
.dark .btn-secondary { background: rgb(var(--brand-paper) / .1); border-color: rgb(var(--line)); }
.btn-ghost { background: transparent; color: rgb(var(--fg)); border-color: rgb(var(--line)); }
.btn-ghost:hover:not(:disabled) { border-color: rgb(var(--fg)); }
.btn-danger { background: rgb(var(--accent)); color: rgb(var(--brand-paper)); }
.dark .btn-danger { color: rgb(var(--brand-ink)); }
.btn-danger:hover:not(:disabled) { filter: brightness(.9); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 999px; color: rgb(var(--fg));
  transition: background-color .15s, color .15s; flex-shrink: 0;
}
.icon-btn:hover { background: rgb(var(--fg) / .08); }
.icon-btn-outline { border: 1px solid rgb(var(--line)); }
.icon-btn-outline:disabled { opacity: .35; }

.field {
  display: block; width: 100%; border: 1px solid rgb(var(--line)); background: rgb(var(--panel));
  color: rgb(var(--fg)); border-radius: 4px; padding: .65rem .8rem; font: inherit; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: rgb(var(--muted)); opacity: .9; }
.field:focus { outline: none; border-color: rgb(var(--brand-red)); box-shadow: 0 0 0 3px rgb(var(--brand-red) / .2); }
.field[aria-invalid="true"] { border-color: rgb(var(--accent)); }
.field:disabled, .field[readonly] { background: rgb(var(--fg) / .04); color: rgb(var(--fg) / .85); cursor: default; }
.field-on-dark { background: rgb(var(--brand-paper)); color: rgb(var(--brand-ink)); border-color: transparent; }
.field-error { color: rgb(var(--accent)); font-size: .85rem; min-height: 1.1em; margin-top: .35rem; }
select.field { appearance: auto; }

/* ---------- header ---------- */
#site-header { position: sticky; top: 0; z-index: 40; background: rgb(var(--surface)); }
.header-top { transition: padding .2s; }
.header-row {
  max-width: 1480px; margin: 0 auto; padding: .9rem 1rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem;
  transition: padding .2s;
}
@media (min-width: 640px) { .header-row { padding: 1.1rem 1.5rem; } }
@media (min-width: 1024px) { .header-row { padding: 1.25rem 2rem; } }
#site-header.is-stuck { box-shadow: 0 2px 12px rgb(var(--brand-ink) / .08); }
#site-header.is-stuck .header-row { padding-top: .45rem; padding-bottom: .45rem; }
.logo-link { display: inline-flex; align-items: center; justify-self: center; }
.logo-img { height: 3.5rem; width: auto; max-width: 46vw; object-fit: contain; transition: height .2s; } /* sized for square logos */
@media (min-width: 640px) { .logo-img { height: 4.25rem; } }
@media (min-width: 1024px) { .logo-img { height: 5rem; } }
#site-header.is-stuck .logo-img { height: 2.75rem; }
@media (min-width: 1024px) { #site-header.is-stuck .logo-img { height: 3.25rem; } }
.dark .logo-img { background: rgb(var(--brand-paper)); border-radius: 8px; padding: 3px; }
.footer-logo { height: 5.5rem; width: auto; max-width: 70vw; object-fit: contain; border-radius: 10px; }

.social-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border-radius: 999px; color: rgb(var(--fg)); transition: color .15s, background-color .15s;
}
.social-btn:hover { background: rgb(var(--brand-red)); color: rgb(var(--brand-paper)); }
.footer-social-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border-radius: 999px; border: 1px solid rgb(255 255 255 / .15); color: rgb(var(--brand-paper));
}
.footer-social-btn:hover { background: rgb(var(--brand-red)); border-color: rgb(var(--brand-red)); }

.lang-select {
  font: inherit; font-size: .85rem; font-weight: 600; color: rgb(var(--fg));
  background: transparent; border: 1px solid rgb(var(--line)); border-radius: 999px;
  padding: .35rem .6rem; max-width: 7.5rem;
}
.lang-select option { color: rgb(var(--brand-ink)); background: rgb(var(--brand-paper)); }

/* nav */
.site-nav { background: rgb(var(--surface)); }
.nav-scroll { position: relative; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.nav-scroll.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
.nav-scroll.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.nav-list { display: flex; flex-wrap: nowrap; justify-content: safe center; gap: .25rem; width: max-content; min-width: 100%; margin: 0 auto; padding: 0 .75rem; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap;
  padding: .8rem .8rem; font-weight: 700; font-size: .95rem; color: rgb(var(--fg));
}
.nav-link::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0; height: 3px;
  background: rgb(var(--brand-red)); transform: scaleX(0); transition: transform .2s;
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-dd { position: relative; }
.nav-dd-menu {
  position: absolute; top: 100%; left: 0; min-width: 12rem; z-index: 50; padding: .5rem 0;
  background: rgb(var(--panel)); border: 1px solid rgb(var(--line)); box-shadow: 0 10px 30px rgb(var(--brand-ink) / .15);
}
.nav-dd-menu a { display: block; padding: .5rem 1rem; }
.nav-dd-menu a:hover { color: rgb(var(--accent)); }

/* drawer */
.drawer-root { position: fixed; inset: 0; z-index: 60; }
.drawer-overlay { position: absolute; inset: 0; background: rgb(var(--brand-ink) / .55); opacity: 0; transition: opacity .25s; }
.drawer {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(22rem, 88vw); overflow-y: auto;
  background: rgb(var(--surface)); color: rgb(var(--fg)); transform: translateX(-100%); transition: transform .25s ease;
  box-shadow: 4px 0 30px rgb(var(--brand-ink) / .25);
}
.drawer-root.is-open .drawer { transform: none; }
.drawer-root.is-open .drawer-overlay { opacity: 1; }
.drawer-link { display: block; padding: .7rem 1.25rem; font-weight: 700; font-size: 1.05rem; border-left: 3px solid transparent; }
.drawer-link:hover, .drawer-link.is-active { border-left-color: rgb(var(--brand-red)); background: rgb(var(--fg) / .04); }

/* ---------- ticker ---------- */
.ticker { background: rgb(var(--brand-ink)); color: rgb(var(--brand-paper)); border-bottom: 1px solid rgb(255 255 255 / .08); }
.dark .ticker { background: rgb(0 0 0 / .35); }
.ticker-inner { max-width: 1480px; margin: 0 auto; display: flex; align-items: stretch; }
.ticker-label {
  flex-shrink: 0; display: flex; align-items: center; padding: .55rem 1rem; font-size: .8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; background: rgb(var(--brand-teal)); color: rgb(var(--brand-paper));
}
.ticker-viewport { overflow: hidden; flex: 1; min-width: 0; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 1.25rem; width: max-content; padding: .55rem 1rem; animation: ticker var(--ticker-duration, 60s) linear infinite; font-size: .9rem; font-weight: 600; }
.ticker-track li { white-space: nowrap; }
.ticker-track a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ticker-viewport:hover .ticker-track, .ticker-viewport:focus-within .ticker-track { animation-play-state: paused; }
.ticker-sep { color: rgb(var(--brand-red)); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-viewport { overflow-x: auto; }
  .ticker-track { animation: none; }
}

/* ---------- labels, headings ---------- */
.label-tag {
  display: inline-block; background: rgb(var(--brand-red)); color: rgb(var(--brand-paper));
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .35rem .7rem; line-height: 1.3;
}
.label-bar {
  display: inline-flex; align-items: center; background: rgb(var(--brand-red)); color: rgb(var(--brand-paper));
  font-size: 1.15rem; font-weight: 800; padding: .45rem 1rem; border-left: 6px solid rgb(var(--brand-paper));
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; margin-bottom: 1.5rem; border-bottom: 2px solid rgb(var(--fg)); }
.section-title { font-size: 1.85rem; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; }
@media (min-width: 640px) { .section-title { font-size: 2.35rem; } }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--accent)); }
.view-all { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.view-all:hover { color: rgb(var(--accent)); }
.view-all-light { color: rgb(var(--brand-paper)); }
.view-all-light:hover { color: rgb(var(--brand-paper)); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- cards ---------- */
.card-link { color: inherit; text-decoration: none; }
.media-box { position: relative; overflow: hidden; background: rgb(var(--brand-teal)); border-radius: 2px; }
.media-box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: rgb(var(--fg)); }
.cat-tri { font-size: .7em; color: rgb(var(--fg)); }
.byline { color: rgb(var(--fg)); }
.play-badge {
  position: absolute; left: .75rem; bottom: .75rem; width: 2.75rem; height: 2.75rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding-left: 3px;
  background: rgb(var(--brand-red)); color: rgb(var(--brand-paper)); box-shadow: 0 4px 14px rgb(0 0 0 / .3);
}
.play-badge-sm { width: 2rem; height: 2rem; left: .5rem; bottom: .5rem; }
.num-big { font-size: 2.6rem; line-height: 1; font-weight: 900; color: rgb(var(--brand-red)); min-width: 1.6rem; font-family: Inter, sans-serif; }
.dark .num-big { color: rgb(var(--accent)); }

.sk { background: linear-gradient(90deg, rgb(var(--fg) / .06), rgb(var(--fg) / .12), rgb(var(--fg) / .06)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 3px; min-height: .75rem; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

.empty-state { text-align: center; padding: 3rem 1rem; border: 1px dashed rgb(var(--line)); border-radius: 6px; }
.empty-icon { display: inline-flex; width: 3.5rem; height: 3.5rem; border-radius: 999px; align-items: center; justify-content: center; background: rgb(var(--fg) / .06); margin-bottom: .75rem; color: rgb(var(--muted)); }

/* ---------- videos block & stories ---------- */
.videos-block { background: rgb(var(--brand-teal)); color: rgb(var(--brand-paper)); }
.videos-block .media-box { background: rgb(var(--brand-ink)); }
.dark .videos-block { background: rgb(var(--brand-teal)); border-block: 1px solid rgb(var(--line)); }

.stories-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: .75rem; overscroll-behavior-x: contain;
}
@media (min-width: 640px) { .stories-track { grid-auto-columns: 30%; } }
@media (min-width: 1024px) { .stories-track { grid-auto-columns: calc((100% - 5rem) / 6); } }
.story { scroll-snap-align: start; }
.story-card {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 8px;
  background: rgb(var(--brand-teal)); color: rgb(var(--brand-paper)); text-align: left;
}
.story-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(var(--brand-ink) / .92)); }
.story-duration {
  position: absolute; top: .6rem; left: .6rem; display: inline-flex; align-items: center; gap: .3rem;
  background: rgb(var(--brand-red)); color: rgb(var(--brand-paper)); font-size: .72rem; font-weight: 700; padding: .2rem .45rem; border-radius: 3px;
}
.story-text { position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem; display: flex; flex-direction: column; gap: .25rem; }
.story-title { font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-loc { font-size: .78rem; opacity: .85; }

/* ---------- subscribe strip ---------- */
.subscribe-strip { background: rgb(var(--brand-teal)); color: rgb(var(--brand-paper)); }
.subscribe-strip .field-error { color: rgb(var(--brand-paper)); }

/* ---------- section page ---------- */
.section-wrap { max-width: 1480px; margin: 0 auto; padding: 2.5rem 1rem 0; }
@media (min-width: 640px) { .section-wrap { padding: 3.5rem 1.5rem 0; } }
@media (min-width: 1024px) { .section-wrap { padding: 4rem 2rem 0; } }
.section-page-title { font-size: 2.25rem; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
@media (min-width: 768px) { .section-page-title { font-size: 3.5rem; } }
@media (min-width: 1280px) { .section-page-title { font-size: 4.25rem; } }

/* ---------- article page ---------- */
.article-wrap { max-width: 1480px; margin: 0 auto; padding: 2rem 1rem 0; }
@media (min-width: 640px) { .article-wrap { padding: 2.5rem 1.5rem 0; } }
@media (min-width: 1024px) { .article-wrap { padding: 3rem 2rem 0; } }
.article-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .article-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 3.5rem; } }
.article-title { margin-top: .75rem; font-size: 1.85rem; line-height: 1.18; font-weight: 900; letter-spacing: -.015em; overflow-wrap: anywhere; }
@media (min-width: 640px) { .article-title { font-size: 2.5rem; } }
@media (min-width: 1024px) { .article-title { font-size: 3.1rem; } }
.article-summary { margin-top: 1rem; font-size: 1.15rem; line-height: 1.55; color: rgb(var(--muted)); }
@media (min-width: 640px) { .article-summary { font-size: 1.35rem; } }
.article-sidebar { position: sticky; top: calc(var(--header-h, 0px) + 1.25rem); }

.article-body-wrap { position: relative; overflow: hidden; margin-top: 2rem; transition: max-height .6s ease; }
@media (prefers-reduced-motion: reduce) { .article-body-wrap { transition: none; } }
.readmore-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 7rem; background: linear-gradient(180deg, rgb(var(--surface) / 0), rgb(var(--surface))); pointer-events: none; }

.prose-mtv { max-width: 46rem; font-size: 1.12rem; line-height: 1.8; }
[lang="or"] .prose-mtv, [lang="or"].prose-mtv { font-size: 1.15rem; line-height: 1.95; }
[lang="hi"] .prose-mtv, [lang="hi"].prose-mtv { font-size: 1.15rem; line-height: 1.9; }
.prose-mtv > * + * { margin-top: 1.15em; }
.prose-mtv a { color: rgb(var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
.prose-mtv h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.35; margin-top: 1.6em; }
.prose-mtv h3 { font-size: 1.25rem; font-weight: 800; margin-top: 1.4em; }
.prose-mtv ul { list-style: disc; padding-left: 1.4em; }
.prose-mtv ol { list-style: decimal; padding-left: 1.4em; }
.prose-mtv li + li { margin-top: .35em; }
.prose-mtv blockquote { border-left: 4px solid rgb(var(--brand-red)); padding: .25em 0 .25em 1.1em; font-style: italic; color: rgb(var(--fg) / .85); }
.prose-mtv img { border-radius: 2px; }
.prose-mtv strong { font-weight: 800; }

.article-meta-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(var(--line)); font-size: .92rem; color: rgb(var(--muted)); display: grid; gap: .25rem; }
.article-meta-bottom time, .article-meta-bottom .font-semibold { color: rgb(var(--fg)); }

.avatar { width: 2.75rem; height: 2.75rem; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--brand-teal)); color: rgb(var(--brand-paper)); font-weight: 800; font-size: 1.1rem; }

.share-bar { display: flex; flex-wrap: wrap; gap: .4rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 1px solid rgb(var(--line)); color: rgb(var(--fg)); transition: background-color .15s, color .15s, border-color .15s;
}
.share-btn:hover { background: rgb(var(--brand-ink)); color: rgb(var(--brand-paper)); border-color: rgb(var(--brand-ink)); }
.dark .share-btn:hover { background: rgb(var(--brand-paper)); color: rgb(var(--brand-ink)); }
.share-btn.is-on { background: rgb(var(--brand-red)); border-color: rgb(var(--brand-red)); color: rgb(var(--brand-paper)); }
.share-btn.is-on svg { fill: currentColor; }

/* ---------- video player ---------- */
.vp { position: relative; width: 100%; aspect-ratio: 16 / 9; background: rgb(var(--brand-ink)); overflow: hidden; border-radius: 2px; }
.vp-vertical { aspect-ratio: 9 / 16; }
.vp iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vp-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.vp-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vp-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 4.5rem; height: 4.5rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding-left: 5px;
  background: rgb(var(--brand-red)); color: rgb(var(--brand-paper)); box-shadow: 0 8px 30px rgb(0 0 0 / .35); transition: transform .15s;
}
.vp-facade:hover .vp-play, .vp-facade:focus-visible .vp-play { transform: translate(-50%, -50%) scale(1.08); }

/* ---------- modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadein .15s; }
.modal-out { animation: fadeout .15s forwards; }
.modal-overlay { position: absolute; inset: 0; background: rgb(var(--brand-ink) / .7); }
.modal-dialog {
  position: relative; width: 100%; max-height: calc(100vh - 2rem); overflow-y: auto; border-radius: 8px;
  background: rgb(var(--surface)); color: rgb(var(--fg)); box-shadow: 0 20px 60px rgb(0 0 0 / .35);
}
.modal-sm { max-width: 28rem; } .modal-md { max-width: 36rem; } .modal-lg { max-width: 48rem; } .modal-xl { max-width: 72rem; }
.modal-lg { align-self: flex-start; margin-top: 6vh; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid rgb(var(--line)); position: sticky; top: 0; background: rgb(var(--surface)); z-index: 1; }
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-body { padding: 1.25rem; }
.modal-bare { background: transparent; box-shadow: none; overflow: visible; }
.modal-bare .modal-body { padding: 0; }
.modal-video { max-width: min(72rem, calc((100vh - 8rem) * 16 / 9)); }
.modal-video-v { max-width: min(26rem, calc((100vh - 8rem) * 9 / 16)); }
.modal-x {
  position: absolute; top: -3rem; right: 0; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; color: rgb(var(--brand-paper)); background: rgb(255 255 255 / .12);
}
.modal-x:hover { background: rgb(var(--brand-red)); }
.video-modal-inner .vp { border-radius: 6px; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.video-modal-title { margin-top: .75rem; color: rgb(var(--brand-paper)); font-weight: 700; text-align: center; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }

/* ---------- toast ---------- */
.toast-region { position: fixed; z-index: 80; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: grid; gap: .5rem; width: min(30rem, calc(100vw - 2rem)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem .8rem 1rem; border-radius: 6px;
  background: rgb(var(--brand-ink)); color: rgb(var(--brand-paper)); box-shadow: 0 10px 30px rgb(0 0 0 / .3);
  border-left: 4px solid rgb(var(--brand-teal)); animation: toastin .2s ease;
}
.dark .toast { background: rgb(var(--brand-paper)); color: rgb(var(--brand-ink)); }
.toast-success { border-left-color: rgb(16 185 129); }
.toast-error { border-left-color: rgb(var(--brand-red)); }
.toast-warning { border-left-color: rgb(245 158 11); }
.toast-msg { flex: 1; font-size: .92rem; font-weight: 500; }
.toast-action { font-weight: 800; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.toast-close { opacity: .7; } .toast-close:hover { opacity: 1; }
.toast-out { opacity: 0; transform: translateY(6px); transition: all .2s; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- back to top ---------- */
.btt {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45; width: 3.25rem; height: 3.25rem; border-radius: 999px;
  background: rgb(var(--surface)); color: rgb(var(--fg)); box-shadow: 0 6px 20px rgb(var(--brand-ink) / .2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s;
}
@media (min-width: 640px) { .btt { right: 1.5rem; bottom: 1.5rem; } }
.btt.is-visible { opacity: 1; visibility: visible; transform: none; }
.btt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.btt-track { fill: none; stroke: rgb(var(--line)); stroke-width: 3; }
.btt-progress { fill: none; stroke: rgb(var(--brand-red)); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.btt-icon { position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ---------- setup notice (only when Supabase isn't configured) ---------- */
.setup-banner { background: rgb(245 158 11 / .18); color: rgb(var(--fg)); font-size: .85rem; text-align: center; padding: .55rem 1rem; border-bottom: 1px solid rgb(245 158 11 / .45); }

/* ---------- static pages (Privacy, Terms, …) ---------- */
.page-wrap { max-width: 52rem; margin: 0 auto; padding: 2.5rem 1rem 0; }
@media (min-width: 640px) { .page-wrap { padding: 3.5rem 1.5rem 0; } }
}
