[hidden] { display: none !important; }
:root {
  --ink: #1b2433;
  --muted: #566074;
  --brand: #1f3b8f;          /* primary action blue (kept for continuity) */
  --brand-700: #1a3279;
  --brand-deep: #0f1c3f;     /* deep midnight — header / footer / hero */
  --accent: #d4a437;         /* glory gold — light filling the darkness */
  --accent-ink: #7d5a12;     /* same gold darkened for text on light surfaces (WCAG AA) */
  --bg: #f3f5fb;
  --surface: #ffffff;
  --border: #e3e8f1;
  --success: #1f7a43;
  --success-bg: #e7f4ec;
  --danger: #b3261e;
  --danger-bg: #fbe9e7;
  --shadow-sm: 0 1px 2px rgba(20,30,60,.06), 0 1px 3px rgba(20,30,60,.05);
  --shadow: 0 10px 30px rgba(20,33,77,.10);
  --shadow-lg: 0 18px 50px rgba(20,33,77,.16);
  --radius: 16px;
  --maxw: 1120px;
  --serif: "Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
/* height:auto is required now that images carry width/height attributes: without
   it the attribute's height is used literally and the image stretches. */
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .6em;
  font-weight: 600;
  letter-spacing: .2px;
}
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
p.lead { font-family: var(--sans); font-size: 1.15rem; color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }
.container { width: min(var(--maxw), calc(100% - 2.5rem)); margin-inline: auto; }

/* Keyboard focus visibility */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.navbar :focus-visible { outline-color: #ffd479; }
main[tabindex="-1"]:focus, header[tabindex="-1"]:focus { outline: none; }

/* Skip link */
.skip-link {
  position: absolute; left: .75rem; top: -120px; z-index: 200;
  background: var(--surface); color: var(--brand);
  padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow);
  font-weight: 600; transition: top .15s ease;
}
.skip-link:focus { top: .75rem; text-decoration: none; }

/* Navbar */
.navbar { background: var(--brand-deep); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 14px rgba(10,20,50,.25); }
.nav-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: #fff; }
.brand:hover { text-decoration: none; }
.brand::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 3px rgba(201,138,31,.25); }
.menu { list-style: none; display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; }
.menu > li { display: flex; }
.menu a, .menu .menu-toggle {
  display: flex; align-items: center; min-height: 44px;
  padding: .5rem .8rem; border-radius: 10px; color: #fff; font: inherit; font-weight: 500;
  background: none; border: none; cursor: pointer;
}
.menu a:hover, .menu a:focus, .menu .menu-toggle:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.menu a[aria-current="page"] { background: rgba(255,255,255,.18); box-shadow: inset 0 -3px 0 var(--accent); }
.more-dropdown { position: relative; }
.menu-toggle .caret { margin-left: .35rem; transition: transform .2s ease; }
.menu-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + .4rem);
  background: var(--brand-deep); min-width: 230px; border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: .4rem; list-style: none; margin: 0;
  border: 1px solid rgba(255,255,255,.08);
}
.dropdown-menu.open { display: block; }
.dropdown-menu a { border-radius: 9px; }
.hamburger { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 22px; padding: 0; background: none; border: none; cursor: pointer; }
.hamburger-line { width: 100%; height: 3px; background: #fff; border-radius: 999px; transition: transform .2s ease, opacity .2s ease; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 520px at 80% -10%, rgba(212,164,55,.32), transparent 60%),
    radial-gradient(700px 600px at 8% 120%, rgba(31,59,143,.40), transparent 60%),
    linear-gradient(155deg, #16264f 0%, #0f1c3f 55%, #0b1530 100%);
  padding: clamp(2.75rem, 1.6rem + 6vw, 5.5rem) 0;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: linear-gradient(90deg, var(--accent), #f0c662); }
.hero-overlay { width: min(var(--maxw), calc(100% - 2.5rem)); margin-inline: auto; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(1.5rem, 1rem + 3vw, 3.25rem); align-items: center; }
.eyebrow { display: inline-block; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1rem; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { color: #fff; font-size: clamp(2.05rem, 1.3rem + 3vw, 3rem); line-height: 1.12; margin-bottom: .5rem; }
.hero .verse { font-family: var(--serif); font-style: italic; font-size: clamp(1.12rem, 1rem + .9vw, 1.45rem); color: #ecdfba; line-height: 1.5; border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.1rem 0; max-width: 46ch; }
.hero .verse-ref, .feature-quote .verse-ref { display: block; font-style: normal; font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #aebbd9; margin-top: .55rem; }
.hero .tagline { font-family: var(--sans); font-size: clamp(1.02rem, 1rem + .4vw, 1.18rem); color: #dfe6f7; max-width: 50ch; margin-bottom: 1.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-figure { margin: 0; }
.hero-figure img { width: 100%; border-radius: 18px; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 30px 70px rgba(0,0,0,.45); }
.hero-figure figcaption { margin-top: .6rem; font-size: .82rem; color: #aebbd9; text-align: center; }
.button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); box-shadow: none; }
.button.ghost:hover { background: rgba(255,255,255,.12); }

/* Sections / panels */
.section { padding: clamp(2rem, 1.4rem + 2.4vw, 3.4rem) 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 1rem + 1.2vw, 2rem); }
.section h2, .panel > h1 { position: relative; padding-bottom: .5rem; }
.section h2::after, .panel > h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 54px; height: 3px; border-radius: 3px; background: var(--accent); }
.intro p { max-width: 68ch; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; transition: transform .18s ease, box-shadow .18s ease; }
.card h3 { margin-bottom: .4rem; }
.video-card { display: flex; flex-direction: column; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-card .row { margin-top: auto; }

/* Buttons */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; background: var(--brand); color: #fff; border: 1px solid transparent;
  border-radius: 12px; padding: .7rem 1.25rem; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover, button:hover { background: var(--brand-700); text-decoration: none; box-shadow: var(--shadow); }
.button:active, button:active { transform: translateY(1px); }
.button.secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.button.secondary:hover { background: #eef2fb; }
.hero .button { background: var(--accent); color: #1a2233; border-color: transparent; }
.hero .button:hover { background: #dca22f; }
.button[disabled], button[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

/* Forms */
.form-grid { display: grid; gap: 1.1rem; max-width: 620px; }
label { display: block; font-weight: 600; margin-bottom: .4rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="file"], textarea {
  width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--border); border-radius: 12px;
  background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:hover, textarea:hover { border-color: #c4cee0; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,59,143,.14); }
textarea { min-height: 140px; resize: vertical; }
.field-hint { font-size: .92rem; color: var(--muted); margin-top: .35rem; }

/* Status / alerts */
.status { padding: .85rem 1rem; border-radius: 12px; font-size: 1rem; display: none; border: 1px solid transparent; }
.status.show { display: flex; gap: .55rem; align-items: flex-start; }
.status.success { background: var(--success-bg); color: var(--success); border-color: #bfe2cc; }
.status.error { background: var(--danger-bg); color: var(--danger); border-color: #efb9b3; }
.status.info { background: var(--bg); color: var(--ink-soft); border-color: var(--border); }

/* Layout utils */
.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }

/* Video page */
.video-wrap video { width: 100%; max-height: 72vh; background: #000; border-radius: 14px; }

/* Progress (admin) */
.progress { height: 14px; width: 100%; background: #e7ecf6; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .25s ease; }

/* Skeleton loaders */
.skeleton-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem; box-shadow: var(--shadow-sm); }
.skeleton { background: linear-gradient(100deg, #eef1f7 30%, #f7f9fd 50%, #eef1f7 70%); background-size: 200% 100%; border-radius: 8px; animation: shimmer 1.3s infinite linear; }
.skeleton.thumb { aspect-ratio: 16 / 9; width: 100%; margin-bottom: .9rem; }
.skeleton.line { height: 1rem; margin: .5rem 0; }
.skeleton.line.short { width: 55%; }
.skeleton.title { height: 1.9rem; width: 55%; margin-bottom: 1rem; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Empty / error states */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .empty-icon { font-size: 2.4rem; margin-bottom: .4rem; }
.empty .row { justify-content: center; }

/* Footer */
.footer { background: var(--brand-deep); color: #dfe6f7; margin-top: auto; padding: 2.25rem 0 1.5rem; }
.footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1.5rem; }
.footer h2 { color: #fff; font-family: var(--serif); font-size: 1.05rem; margin-bottom: .6rem; padding-bottom: 0; }
.footer h2::after { content: none; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--serif); font-size: 1.25rem; color: #fff; }
.foot-brand::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.foot-about { margin-top: .6rem; color: #c2cde6; }
.footer .legal { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .92rem; color: #aebbd9; }

/* Honeypot field (hidden from real users) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
code.inline { background: #eef2ff; border: 1px solid #d7dfff; padding: .1rem .35rem; border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Responsive */
@media (max-width: 820px) {
  .hamburger { display: flex; }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--brand-deep); flex-direction: column; align-items: stretch;
    padding: .5rem 1rem 1rem; gap: .15rem; box-shadow: 0 18px 30px rgba(10,20,50,.3);
    max-height: calc(100vh - 68px); max-height: calc(100dvh - 68px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .menu.active { display: flex; }
  .menu > li { width: 100%; }
  .menu a, .menu .menu-toggle { width: 100%; }
  .more-dropdown { flex-direction: column; }
  .dropdown-menu { position: static; box-shadow: none; min-width: 0; background: rgba(255,255,255,.06); margin-top: .25rem; border: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Homepage components (PCCE) ---- */
.section.alt { background: #eef1f8; }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.section-head .eyebrow { color: var(--brand); }
.section-head h2 { display: inline-block; }
.section-head h2::after { left: 50%; transform: translateX(-50%); }
.section-head p { color: var(--muted); margin: 0; }
.section-foot { text-align: center; margin-top: 1.5rem; }
.text-link { color: var(--brand); font-weight: 600; }

/* Start-here pathway */
.pathway { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.pathway-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pathway-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d3ea; text-decoration: none; }
.pathway-card .step { font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.pathway-card h3 { margin: .45rem 0 .35rem; }
.pathway-card p { color: var(--muted); margin: 0; }
.pathway-card .more { display: inline-block; margin-top: .85rem; color: var(--brand); font-weight: 600; }

/* Booklets */
.booklet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.booklet { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.booklet:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.booklet .cover { background: linear-gradient(160deg, #1a2a52, #0f1c3f); padding: 1rem; height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
/* The covers are wrapped in <picture>, which would otherwise sit between the
   flex container and the image and leave max-height:100% resolving against a
   height of auto — so the cover overflows its box and rides over the text
   below. display:contents makes the image itself the flex item. */
.booklet .cover picture { display: contents; }
.booklet .cover img { max-height: 100%; max-width: 100%; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.booklet .body { padding: 1.15rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.booklet h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.booklet p { color: var(--muted); font-size: .97rem; flex: 1; margin: 0; }
.booklet .button { margin-top: 1.1rem; }

/* Watch & listen strip */
.thumb-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: .5rem; }
.thumb-strip a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); background: #0b1530; transition: transform .18s ease; }
.thumb-strip a:hover { transform: translateY(-2px); }
.thumb-strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

/* Hope of Israel feature band */
.feature-band { position: relative; color: #fff; background: radial-gradient(800px 400px at 85% 0%, rgba(212,164,55,.22), transparent 60%), linear-gradient(160deg, #13234a, #0c1734); padding: clamp(3rem, 2rem + 4vw, 5rem) 0; }
.feature-band .eyebrow { color: var(--accent); }
.feature-band h2 { color: #fff; }
.feature-band h2::after { background: var(--accent); }
.feature-quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 1rem + 1.1vw, 1.55rem); line-height: 1.5; color: #ecdfba; border-left: 3px solid var(--accent); padding-left: 1.25rem; margin: 1.5rem 0; max-width: 60ch; }
.feature-band p { color: #d7ddf0; max-width: 65ch; }
.feature-band .button { background: var(--accent); color: #1a2233; border-color: transparent; }
.feature-band .button:hover { background: #e2b54a; }

/* Join us */
.join-card { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.75rem; align-items: center; }
.join-when { display: grid; gap: .5rem; }
.join-when .big { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); color: var(--ink); line-height: 1.2; }
.join-when .where { color: var(--muted); }
.join-when .meta { color: var(--muted); font-size: .95rem; }
.join-actions { display: flex; flex-direction: column; gap: .75rem; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .join-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .thumb-strip { grid-template-columns: 1fr; }
}

/* Booklets page */
.booklet-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin: 1.5rem 0; }
.booklet-toolbar input { max-width: 360px; }
.booklet .cover.cover--text { align-items: center; text-align: center; color: #fff; }
.booklet .cover.cover--text span { font-family: var(--serif); font-size: 1.05rem; line-height: 1.3; }

/* Login/Logout button in the nav */
.menu .nav-auth { border: 1.5px solid rgba(255,255,255,.5); border-radius: 10px; }
.menu .nav-auth:hover { background: rgba(255,255,255,.16); }

/* Select inputs (match text inputs) */
select { width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,59,143,.14); }

/* Delete button */
.button.danger { background: var(--danger); border-color: transparent; }
.button.danger:hover { background: #9c2017; }

/* Admin: manage videos */
.manage-toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .25rem 0 1.25rem; }
.manage-toolbar input[type="search"] { flex: 1; min-width: 200px; padding: .7rem .9rem; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.manage-toolbar input[type="search"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,59,143,.14); }

.manage-groups { display: flex; flex-direction: column; gap: 1.6rem; }
.manage-group-head { display: flex; align-items: baseline; gap: .55rem; margin-bottom: .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border); }
.manage-group-head h3 { margin: 0; font-size: 1.05rem; }
.manage-group-head .count { font-size: .85rem; font-weight: 700; color: #5b6b8c; background: #eef2fb; border-radius: 999px; padding: .05rem .5rem; }

.manage-list { display: grid; gap: .65rem; }
.manage-card { display: flex; align-items: center; gap: 1rem; padding: .7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.manage-thumb { width: 104px; height: 58px; object-fit: cover; border-radius: 8px; background: #e7ecf6; flex: none; }
.manage-thumb--empty { display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); font-size: 1.3rem; background: linear-gradient(160deg, #1a2a52, #0f1c3f); }
.manage-meta { display: flex; flex-direction: column; gap: .4rem; flex: 1; min-width: 0; }
.manage-title { overflow-wrap: anywhere; line-height: 1.3; }
.manage-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; }
.manage-date { font-size: .82rem; color: #5b6b8c; }
.manage-tag { font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; background: #eef2fb; color: var(--brand); }
.manage-tag.warn { background: #fbeee9; color: #9c2017; }

.section-badge { font-size: .8rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; background: #eef2fb; color: var(--brand); }
.section-badge.section-memorials { background: #f3ecda; color: #8a6516; }
.section-badge.section-classes { background: #e7f0ea; color: #1f6b40; }

.manage-actions, .manage-confirm { display: flex; align-items: center; gap: .5rem; flex: none; }
.manage-confirm { display: none; flex-wrap: wrap; justify-content: flex-end; }
.manage-confirm span { font-size: .88rem; color: #7a1f16; }
.manage-card.confirming { border-color: var(--danger); background: #fdf3f1; }
.manage-card.confirming .manage-actions { display: none; }
.manage-card.confirming .manage-confirm { display: flex; }

.button.small { padding: .45rem .8rem; font-size: .9rem; }
.manage-empty { color: #5b6b8c; font-size: .9rem; padding: .4rem 0; }

@media (max-width: 640px) {
  .manage-card { flex-wrap: wrap; }
  .manage-thumb { width: 76px; height: 43px; }
  .manage-meta { flex-basis: calc(100% - 92px); }
  .manage-actions, .manage-confirm { width: 100%; justify-content: flex-end; }
}

/* ---- Listing toolbar (search + sort) ---- */
.list-toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 1.25rem; }
.list-toolbar input[type="search"] { flex: 1; min-width: 200px; padding: .7rem .9rem; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.list-toolbar input[type="search"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,59,143,.14); }
.sort-field { display: inline-flex; align-items: center; gap: .5rem; flex: none; }
.sort-field > span { color: #5b6b8c; font-size: .9rem; font-weight: 600; }
.sort-field select { width: auto; min-width: 150px; }

/* ---- Single video: layout + suggestions ---- */
.video-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(240px, 1fr); gap: 1.75rem; align-items: start; }
.video-main video { width: 100%; border-radius: 14px; background: #000; display: block; }
.video-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.video-head h1 { margin: 0; }
.series-pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--accent-soft, #f3ecda); color: var(--accent-strong, #8a6516); }

.video-suggest h2 { font-size: 1.05rem; margin: 0 0 .85rem; }
.suggest-list { display: flex; flex-direction: column; gap: .6rem; }
.suggest-item { display: flex; gap: .7rem; align-items: center; padding: .4rem; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: inherit; background: var(--surface); transition: background .15s, border-color .15s; }
.suggest-item:hover { background: #eef2fb; border-color: var(--brand); }
.suggest-thumb { width: 116px; height: 66px; border-radius: 8px; overflow: hidden; flex: none; background: #e7ecf6; display: flex; align-items: center; justify-content: center; }
.suggest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.suggest-thumb--empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); background: linear-gradient(160deg, #1a2a52, #0f1c3f); }
.suggest-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.suggest-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.suggest-badge { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: .08rem .45rem; border-radius: 999px; background: var(--accent-soft, #f3ecda); color: var(--accent-strong, #8a6516); }
@media (max-width: 900px) { .video-layout { grid-template-columns: 1fr; } }

/* ---- Series toggle + edit form (admin) ---- */
.check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.check input { width: auto; }
.field-hint { font-size: .82rem; color: #5b6b8c; margin: .35rem 0 0; }
#series-options, .edit-series-opts { margin-top: .6rem; }

.manage-tag.series { background: var(--accent-soft, #f3ecda); color: var(--accent-strong, #8a6516); }
.manage-card.editing { flex-wrap: wrap; border-color: var(--brand); background: #f7f9fe; }
.manage-card.editing .manage-actions { display: none; }
.manage-edit { display: none; width: 100%; }
.manage-card.editing .manage-edit { display: block; margin-top: .75rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.edit-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.edit-form .check { margin-bottom: 0; }

/* Admin: contact messages inbox */
.messages-list { display: flex; flex-direction: column; gap: .75rem; }
.message-card { border: 1px solid var(--border); border-radius: 12px; padding: .85rem 1rem; background: var(--surface); }
.message-head { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; }
.message-meta { color: #5b6b8c; font-size: .85rem; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: .5rem 0 .6rem; }
.message-actions { display: flex; }
.message-confirm { display: none; align-items: center; gap: .5rem; flex-wrap: wrap; }
.message-card.confirming { border-color: var(--danger); background: #fdf3f1; }
.message-card.confirming .message-actions { display: none; }
.message-card.confirming .message-confirm { display: flex; }

/* ---- Custom video player (YouTube-style) ---- */
.vp { position: relative; background: #000; border-radius: 14px; overflow: hidden; line-height: 0; outline: none; user-select: none; -webkit-user-select: none; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.vp-video { width: 100%; display: block; background: #000; }
.vp-video::-webkit-media-controls { display: none !important; }
.vp-video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.vp[data-controls="hidden"] { cursor: none; }

/* center big-play */
.vp-bigplay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; transition: background .15s ease, transform .1s ease; }
.vp-bigplay svg { width: 38px; height: 38px; margin-left: 3px; }
.vp-bigplay:hover { background: rgba(0, 0, 0, .72); }
.vp-bigplay:active { transform: translate(-50%, -50%) scale(.94); }
.vp[data-state="playing"] .vp-bigplay, .vp[data-loading="true"] .vp-bigplay { display: none; }

/* buffering spinner */
.vp-spinner { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: vp-spin 1s linear infinite; z-index: 3; display: none; }
.vp[data-loading="true"] .vp-spinner { display: block; }
@keyframes vp-spin { to { transform: rotate(360deg); } }

/* scrim + controls fade */
.vp-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0)); z-index: 1; pointer-events: none; opacity: 1; transition: opacity .25s ease; }
.vp-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 8px; z-index: 2; opacity: 1; transition: opacity .25s ease; }
.vp[data-controls="hidden"] .vp-controls { opacity: 0; }
.vp[data-controls="hidden"] .vp-scrim { opacity: 0; }

/* progress / seek bar */
.vp-progress { height: 16px; display: flex; align-items: center; cursor: pointer; margin-bottom: 2px; touch-action: none; }
.vp-track { position: relative; width: 100%; height: 4px; background: rgba(255, 255, 255, .3); border-radius: 2px; transition: height .12s ease; }
.vp-progress:hover .vp-track, .vp.vp-scrubbing .vp-track { height: 6px; }
.vp-buffered, .vp-played { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; }
.vp-buffered { background: rgba(255, 255, 255, .45); }
.vp-played { background: #ff0000; width: 0; }
.vp-handle { position: absolute; right: -6px; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #ff0000; transform: translateY(-50%) scale(0); transition: transform .12s ease; }
.vp-progress:hover .vp-handle, .vp.vp-scrubbing .vp-handle { transform: translateY(-50%) scale(1); }
.vp-progress:focus-visible .vp-track { outline: 2px solid #fff; outline-offset: 3px; }

/* control bar */
.vp-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vp-bar-left, .vp-bar-right { display: flex; align-items: center; gap: 1px; }
.vp-btn { background: none; border: none; color: #fff; padding: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: .92; transition: opacity .15s ease, transform .1s ease; position: relative; line-height: 0; }
.vp-btn:hover { opacity: 1; }
.vp-btn:active { transform: scale(.9); }
.vp-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-radius: 5px; }
.vp-btn svg { width: 24px; height: 24px; display: block; }
.vp-10 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -36%); font-size: 7px; font-weight: 700; line-height: 1; pointer-events: none; }
.vp-time { color: #fff; font-size: 13px; margin-left: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp-speed { color: #fff; font-size: 13px; font-weight: 600; min-width: 32px; }

/* icon state swaps */
.vp-btn .i-pause, .vp-btn .i-mute, .vp-btn .i-fsclose { display: none; }
.vp[data-state="playing"] .i-play { display: none; }
.vp[data-state="playing"] .i-pause { display: block; }
.vp[data-muted="true"] .i-vol { display: none; }
.vp[data-muted="true"] .i-mute { display: block; }
.vp[data-fs="true"] .i-fsopen { display: none; }
.vp[data-fs="true"] .i-fsclose { display: block; }

/* volume slider (reveals on hover) */
.vp-volume { display: flex; align-items: center; }
.vp-vol { -webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; background: rgba(255, 255, 255, .4); border-radius: 2px; cursor: pointer; transition: width .2s ease, opacity .2s ease; vertical-align: middle; margin: 0 2px; }
.vp-volume:hover .vp-vol, .vp-vol:focus-visible { width: 70px; opacity: 1; }
.vp-vol::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: none; cursor: pointer; }
.vp-vol::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: none; cursor: pointer; }
.vp-vol::-moz-range-track { height: 4px; background: rgba(255, 255, 255, .4); border-radius: 2px; }

/* fullscreen */
.vp:fullscreen { width: 100vw; height: 100vh; border-radius: 0; display: flex; align-items: center; justify-content: center; }
.vp:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; }
.vp:fullscreen .vp-video, .vp:-webkit-full-screen .vp-video { width: 100%; height: 100%; max-height: 100vh; object-fit: contain; }

@media (max-width: 640px) {
  .vp-vol { display: none; }
  .vp-btn { padding: 5px; }
  .vp-btn svg { width: 22px; height: 22px; }
  .vp-time { font-size: 12px; margin-left: 3px; }
  .vp-bigplay { width: 62px; height: 62px; }
  .vp-bigplay svg { width: 32px; height: 32px; }
}

/* ---- Migrated content pages (prose) ---- */
.prose > p, .prose > ul, .prose > ol, .prose > h2, .prose > h3, .prose > blockquote { max-width: 70ch; }
.prose > p, .prose > ul, .prose > ol { margin: 0 0 1.05rem; line-height: 1.75; }
.prose h2 { margin: 1.9rem 0 .7rem; font-size: 1.32rem; }
.prose h3 { margin: 1.4rem 0 .45rem; font-size: 1.08rem; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; line-height: 1.65; }
.prose em { font-style: italic; }
.prose .ref { color: var(--muted); font-style: normal; font-size: .92em; }
.prose blockquote { border-left: 3px solid var(--accent); padding: .4rem 0 .4rem 1.1rem; margin: 1.25rem 0; color: #3b465c; font-style: italic; }
.prose blockquote .ref { display: block; margin-top: .35rem; font-style: normal; }
.prose .row { margin-top: 1.6rem; }
.info-list { list-style: none; padding: 0; margin: 0 0 1.05rem; }
.info-list li { margin: .3rem 0; line-height: 1.6; }
.info-list strong { display: inline-block; min-width: 7.5rem; color: var(--ink); }

/* Two-column program list on content pages */
.program { list-style: none; padding: 0; margin: 0 0 1.05rem; columns: 2; column-gap: 2.75rem; }
.program li { break-inside: avoid; padding: .5rem 0; border-bottom: 1px solid var(--border); line-height: 1.45; }
.program li .prog-date { display: block; color: var(--muted); font-size: .82rem; margin-bottom: .1rem; }
@media (max-width: 680px) { .program { columns: 1; } }

/* ---- Booklet printed-copy request ---- */
.booklet-pick { display: flex; align-items: center; gap: .45rem; margin-top: .6rem; font-size: .85rem; color: var(--muted); cursor: pointer; user-select: none; }
.booklet-pick input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; flex: none; }

/* pinned button that follows the scroll */
.request-fab { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 50; background: var(--brand); color: #fff; border: none; border-radius: 999px; padding: .8rem 1.25rem; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(20, 33, 77, .3); display: inline-flex; align-items: center; gap: .55rem; }
.request-fab:hover { background: var(--brand-deep); }
.request-fab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.request-fab-badge { background: #fff; color: var(--brand); border-radius: 999px; min-width: 1.5em; height: 1.5em; padding: 0 .4em; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }

/* popup (opens only on click) */
.request-modal { position: fixed; inset: 0; z-index: 300; display: flex; overflow-y: auto; padding: 1.5rem 1rem; }
.request-modal[hidden] { display: none; }
.request-backdrop { position: fixed; inset: 0; background: rgba(10, 18, 40, .55); }
.request-panel-inner { position: relative; z-index: 1; margin: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); max-width: 540px; width: 100%; padding: 1.6rem; }
.request-panel-inner h2 { margin: 0 0 .25rem; }
.request-close { position: absolute; top: .5rem; right: .7rem; background: none; border: none; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: .2rem .4rem; }
.request-close:hover { color: var(--ink); }
.request-intro { color: var(--muted); margin: 0 0 1rem; }
.request-pickline { margin: .5rem 0 .35rem; }
.request-list { list-style: none; margin: 0 0 1.1rem; padding: 0; max-height: 200px; overflow-y: auto; }
.request-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .25rem 0; line-height: 1.4; border-bottom: 1px solid var(--border); }
.request-list li:last-child { border-bottom: none; }
.request-empty { color: var(--muted); border-bottom: none !important; }
.request-remove { background: none; border: none; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 0 .25rem; flex: none; }
.request-remove:hover { color: var(--danger); }
.request-form label { display: block; margin-bottom: .8rem; font-weight: 600; }
.request-form input, .request-form textarea, .request-form select { width: 100%; margin-top: .3rem; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 9px; font: inherit; font-weight: 400; box-sizing: border-box; background: #fff; }
.request-form input:focus, .request-form textarea:focus, .request-form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.request-row { display: flex; gap: .75rem; }
.request-row label { flex: 1; }
.request-actions { display: flex; gap: .6rem; margin-top: .3rem; }
.request-submit:disabled { opacity: .55; cursor: not-allowed; }
.request-status { font-weight: 600; margin-bottom: .4rem; }
.request-status.error { color: var(--danger); }
.request-status.success { color: var(--success); }
@media (max-width: 520px) { .request-fab { right: .8rem; bottom: .8rem; padding: .7rem 1rem; font-size: .95rem; } }

/* ---- Video description (collapsible) ---- */
.video-desc { margin: 1.1rem 0 0; padding: 1rem 1.1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.video-desc-text { white-space: pre-wrap; line-height: 1.65; color: var(--ink); }
.video-desc[data-collapsed="true"] .video-desc-text { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.video-desc-toggle {
  display: inline; margin-top: .5rem; min-height: 0;
  background: none; border: none; box-shadow: none; border-radius: 0;
  color: var(--brand); font: inherit; font-weight: 600; cursor: pointer;
  padding: .15rem 0; -webkit-tap-highlight-color: transparent;
}
.video-desc-toggle:hover { background: none; box-shadow: none; text-decoration: underline; }
.video-desc-toggle:active { background: none; box-shadow: none; transform: none; }
.video-desc-toggle:focus { outline: none; }
.video-desc-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---- Turnstile widget slot (collapses when disabled / empty) ---- */
.cf-turnstile-holder { margin: .25rem 0 .9rem; min-height: 0; }
.cf-turnstile-holder:empty { display: none; }
.request-form .cf-turnstile-holder { margin: .2rem 0 .6rem; }

/* ---- Admin stats table ---- */
.stats-table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.stats-table th, .stats-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); text-align: left; }
.stats-table th { cursor: pointer; user-select: none; white-space: nowrap; background: var(--bg); position: sticky; top: 0; }
.stats-table th.num, .stats-table td.num { text-align: right; }
.stats-table tbody tr:hover { background: rgba(31, 59, 143, .05); }
.stats-table tfoot td { font-weight: 600; border-bottom: none; }

/* ---- Admin tabs ---- */
.admin-tabs { display: flex; gap: .4rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; margin-bottom: 1.1rem; border-bottom: 2px solid var(--border); -webkit-overflow-scrolling: touch; }
.admin-tab { white-space: nowrap; padding: .55rem .95rem; border-radius: 10px 10px 0 0; font-weight: 600; color: var(--ink-soft); text-decoration: none; border: 2px solid transparent; border-bottom: none; }
.admin-tab:hover { color: var(--brand); }
.admin-tab[aria-current="page"] { color: var(--brand); background: #fff; border-color: var(--border); position: relative; top: 2px; }
.tab-count { display: inline-block; min-width: 1.35em; padding: 0 .35em; margin-left: .3em; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78em; text-align: center; }
.panel[hidden] { display: none; }

/* ---- Upload form steps ---- */
fieldset.step { border: 1.5px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem 1.15rem; margin: 0; display: grid; gap: 1.1rem; }
fieldset.step legend { font-weight: 700; color: var(--brand-deep); padding: 0 .45rem; }
label .req, label .opt { font-size: .74em; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; border-radius: 999px; padding: .12em .55em; margin-left: .4em; vertical-align: middle; }
label .req { background: #fdecec; color: #a02020; }
label .opt { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--border); }
.file-chosen { color: var(--brand-700); font-weight: 600; }

/* ---- Admin: mobile fixes ---- */
/* Browsers give <fieldset> an intrinsic min-width of min-content, which
   box-sizing can't override. An unshrinkable file input inside then forces
   the fieldset — and the whole page — wider than a phone screen. */
fieldset.step { min-width: 0; }
.admin-title { margin: 0 0 .75rem; }

/* File inputs refuse to shrink below their "Choose File / no file selected"
   text; let them wrap and never exceed their container. */
input[type="file"] { max-width: 100%; }

@media (max-width: 640px) {
  /* Show every tab instead of hiding some behind a sideways scroll. */
  .admin-tabs { flex-wrap: wrap; overflow-x: visible; gap: .3rem; }
  .admin-tab { padding: .45rem .7rem; font-size: .93rem; border-radius: 10px; border-bottom: 2px solid transparent; }
  .admin-tab[aria-current="page"] { top: 0; border-color: var(--border); }

  fieldset.step { padding: .85rem .8rem 1rem; gap: .9rem; }
  fieldset.step legend { font-size: .95rem; }
  input[type="file"] { padding: .6rem; font-size: .9rem; }
  .stats-table { font-size: .85rem; }
  .stats-table th, .stats-table td { padding: .45rem .4rem; }
}

/* ---- Admin: stop wide content stretching the page ----
   A block whose content has a large intrinsic width (a wide table, a file
   input) won't shrink below that width unless min-width is released. Without
   this, the stats table widened the whole page instead of scrolling inside
   its own box. */
.panel, .panel > *, .stats-table-wrap, .messages-list, .manage-list { min-width: 0; }
.stats-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- Stats table as cards on phones ----
   Six columns can't be read on a phone even with sideways scrolling, so each
   talk becomes a labelled card instead. */
@media (max-width: 640px) {
  .stats-table-wrap { overflow-x: visible; }
  .stats-table, .stats-table tbody, .stats-table tfoot, .stats-table tr, .stats-table td { display: block; width: 100%; }
  .stats-table thead { display: none; }
  .stats-table tr {
    border: 1.5px solid var(--border); border-radius: 12px;
    padding: .7rem .85rem; margin-bottom: .6rem; background: #fff;
  }
  .stats-table td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    border: none; padding: .22rem 0; text-align: right;
  }
  .stats-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--ink-soft);
    text-align: left; flex: 0 0 auto;
  }
  .stats-table td.cell-title {
    display: block; text-align: left; font-weight: 700; font-size: 1.02rem;
    color: var(--brand-deep); margin-bottom: .35rem;
    padding-bottom: .4rem; border-bottom: 1px solid var(--border);
  }
  .stats-table td.cell-title::before { display: none; }
  .stats-table td:empty { display: none; }
  .stats-table tfoot tr { background: var(--bg); border-style: dashed; }
  .stats-sort-mobile { display: flex; }
}
.stats-sort-mobile { display: none; align-items: center; gap: .5rem; width: 100%; }
.stats-sort-mobile select { flex: 1; min-width: 0; }

/* ---- "Show more" paging rows ---- */
.show-more-row { display: flex; justify-content: center; margin-top: 1.1rem; }
.show-more-row .button { width: 100%; max-width: 420px; }
.manage-note { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; margin: 0 0 1rem; color: var(--ink-soft); font-size: .93rem; }

/* ---- Admin error log cards ---- */
.err-card .err-badge { display: inline-block; font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: #fdecec; color: #a02020; border-radius: 999px; padding: .1em .55em; margin-right: .4em; vertical-align: middle; }
.err-src { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; color: var(--ink-soft); margin: .1rem 0 .4rem; word-break: break-all; }
.err-stack { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.5; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; margin: .3rem 0 .5rem; overflow-x: auto; white-space: pre-wrap; word-break: break-word; max-height: 15rem; overflow-y: auto; }

/* ---- Video duration badge (YouTube-style, bottom-right of thumbnail) ---- */
.thumb-wrap { position: relative; display: block; }
.video-duration {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(0, 0, 0, .82); color: #fff;
  font-size: .78rem; font-weight: 600; line-height: 1;
  padding: 3px 5px; border-radius: 4px; letter-spacing: .02em;
  pointer-events: none;
}

/* ---- Upload drag-and-drop highlight ---- */
fieldset.step.drag-over { border-color: var(--brand); background: rgba(31, 59, 143, .06); box-shadow: 0 0 0 2px var(--brand) inset; }

/* ---- Video page action chips (YouTube-style pills) ---- */
.video-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 .4rem; }
.video-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1rem; border-radius: 999px; min-height: 42px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--border);
  box-shadow: none; font: inherit; font-weight: 600; font-size: .93rem;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.video-chip:hover { background: rgba(31, 59, 143, .08); border-color: var(--brand); color: var(--brand); text-decoration: none; }
.video-chip:active { transform: translateY(1px); }
.video-chip svg { flex-shrink: 0; opacity: .75; }
.video-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Audio-only (data saver) mode ---- */

/* ---- Player quality toggle (HD / 720p) ---- */
/* line-height must be reset: .vp sets it to 0 for the video element, which
   collapses real text (the old control here was an icon button, not text). */
.vp-quality { color: #fff; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.5; height: auto; display: inline-block; vertical-align: middle; border: 0; border-radius: 5px; background-color: transparent; padding: 2px 15px 2px 5px; margin: 0 2px; cursor: pointer; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 3px center; background-size: 9px 6px; }
.vp-quality:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
/* The dropdown list itself renders on the page background, not the dark bar. */
.vp-quality option { color: #111; background: #fff; }
.vp-quality[data-mode="saver"] { color: #7fd1a8; }

/* ---- File transfer page ---- */
.transfer-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 1.6rem 1rem; text-align: center; margin-top: 1rem; transition: background .15s, border-color .15s; }
.transfer-drop.drag-over { border-color: var(--brand); background: rgba(31, 59, 143, .06); }

/* ---- Admin file-transfer rows ---- */
.tr-row { padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .6rem; }
.tr-name { font-weight: 600; font-size: .92rem; word-break: break-word; }
.tr-status { font-size: .85rem; margin-top: .3rem; }

/* ---- Data saver toggle at top of video page ---- */
.ds-note { font-size: .82rem; }

/* ---- Seminar schedule table (scrolls sideways on narrow screens) ---- */
.schedule-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; }
.schedule-table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: .86rem; }
.schedule-table th { background: var(--brand); color: #fff; padding: .5rem .55rem; text-align: center; font-size: .9rem; font-weight: 700; }
.schedule-table th span { display: block; font-weight: 400; font-size: .76rem; opacity: .85; margin-top: .1rem; }
.schedule-table td { border: 1px solid var(--border); padding: .5rem .55rem; text-align: center; vertical-align: middle; }
.schedule-table tbody tr:nth-child(even) td { background: var(--bg); }
.schedule-table td.hl { color: #c0392b; font-weight: 600; }

/* ---- Seminar schedule image ---- */
.seminar-schedule-img { display: block; width: 100%; height: auto; max-width: 900px; margin: 1rem 0 1.5rem; border: 1px solid var(--border); border-radius: 10px; }

/* Visually hidden but available to screen readers and the heading outline. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
