:root {
  --ink: #1d1a16;
  --muted: #6e665b;
  --paper: #f6efe1;
  --parchment: #fbf7ed;
  --surface: #ffffff;
  --green: #1f4638;
  --green-2: #315e4c;
  --burgundy: #7b2f2f;
  --gold: #b08a3c;
  --line: rgba(29, 26, 22, 0.16);
  --line-strong: rgba(29, 26, 22, 0.28);
  --shadow: 0 18px 46px rgba(29, 26, 22, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(251, 247, 237, 0.9), rgba(239, 231, 215, 0.9)),
    var(--paper);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

body[data-lang="zh"] {
  font-family: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: rgba(251, 247, 237, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--parchment);
  background: var(--green);
  border: 1px solid rgba(176, 138, 60, 0.55);
  border-radius: 50%;
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-text small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 650;
}

.site-nav a {
  padding: 9px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--green);
  background: rgba(31, 70, 56, 0.08);
}

.site-nav a.is-active {
  color: var(--parchment);
  background: var(--green);
}

.page-panel[hidden] {
  display: none !important;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.language-switch button {
  min-width: 38px;
  min-height: 32px;
  padding: 6px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.language-switch button.is-active {
  color: var(--parchment);
  background: var(--green);
}

.hero {
  position: relative;
  display: grid;
  min-height: 78svh;
  align-items: end;
  padding: clamp(82px, 12vw, 138px) clamp(22px, 6vw, 78px) 34px;
  color: var(--parchment);
  background:
    linear-gradient(90deg, rgba(12, 18, 14, 0.92), rgba(12, 18, 14, 0.74) 43%, rgba(12, 18, 14, 0.16)),
    url("assets/images/confessional-hero.jpg")
      center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  right: clamp(20px, 5vw, 72px);
  bottom: 28px;
  width: min(280px, 32vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 138, 60, 0.75), transparent);
}

.hero-copy {
  width: min(790px, 100%);
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body[data-lang="zh"] .eyebrow {
  letter-spacing: 0.12em;
}

.hero h1 {
  display: grid;
  gap: 10px;
  margin: 0;
  font-size: clamp(52px, 8vw, 98px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.42);
}

.hero h1 small {
  color: rgba(251, 247, 237, 0.82);
  font-size: clamp(21px, 2.4vw, 34px);
  font-weight: 500;
}

.hero-lead,
.section-lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(251, 247, 237, 0.88);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.65;
}

.section-lead {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  color: var(--parchment);
  background: var(--burgundy);
  box-shadow: 0 12px 24px rgba(123, 47, 47, 0.28);
}

.button-secondary {
  color: var(--parchment);
  border-color: rgba(251, 247, 237, 0.5);
  background: rgba(251, 247, 237, 0.11);
}

.service-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  width: min(790px, 100%);
  margin-top: 54px;
  padding-top: 18px;
  color: rgba(251, 247, 237, 0.78);
  border-top: 1px solid rgba(251, 247, 237, 0.3);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.service-strip strong {
  color: var(--parchment);
  font-size: 20px;
}

.service-strip span,
.service-strip strong {
  min-width: 0;
}

.section {
  scroll-margin-top: 92px;
  padding: clamp(58px, 8vw, 104px) clamp(20px, 5vw, 64px);
}

.section-heading {
  width: min(var(--max), 100%);
  margin: 0 auto 30px;
}

.section-heading h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.about-grid,
.timeline,
.course-hub,
.photo-grid,
.drive-app,
.contact-band,
.confession-intro,
.confession-content,
.confession-grid,
.standards-band {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

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

.about-grid article,
.confession-card,
.lesson-list-panel,
.lesson-player-panel,
.drive-form,
.drive-files,
.photo-grid figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.about-grid article {
  min-width: 0;
  padding: 26px;
}

.about-grid h3,
.timeline strong {
  margin: 0 0 10px;
  font-size: 22px;
}

.about-grid p,
.timeline p,
.standards-band p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.confession-section {
  background: var(--parchment);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.confession-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: 24px;
  align-items: end;
}

.confession-intro .section-heading {
  margin: 0;
}

.confession-seal {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 24px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 239, 224, 0.92)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: inset 0 0 0 6px rgba(176, 138, 60, 0.08);
}

.confession-seal::before,
.confession-seal::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 138, 60, 0.65), transparent);
}

.confession-seal::before {
  top: 13px;
}

.confession-seal::after {
  bottom: 13px;
}

.seal-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  color: var(--parchment);
  background: var(--green);
  border: 1px solid rgba(176, 138, 60, 0.7);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
}

.confession-seal p {
  margin: 0;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.confession-seal strong {
  font-size: 24px;
}

.confession-seal small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.confession-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.confession-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 22px;
}

.confession-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--parchment);
  background: var(--green);
  border-radius: 50%;
  font-weight: 800;
}

.confession-card p {
  margin: 0 0 6px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.confession-card h3 {
  margin: 0 0 9px;
  font-size: 21px;
}

.confession-card small {
  display: block;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.confession-content {
  margin-top: 28px;
}

.confession-toc > p,
.confession-article-heading small {
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.confession-reader {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.confession-toc {
  position: sticky;
  top: 92px;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.confession-toc > p {
  margin: 0 0 12px;
}

.confession-toc nav {
  display: grid;
  gap: 6px;
}

.confession-toc button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.confession-toc button:hover,
.confession-toc button:focus-visible {
  color: var(--green);
  background: rgba(31, 70, 56, 0.08);
  outline: 0;
}

.confession-toc span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--parchment);
  background: var(--green);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
}

.confession-toc strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confession-document {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.confession-article-full {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.confession-article-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 30px);
  background:
    linear-gradient(90deg, rgba(31, 70, 56, 0.96), rgba(74, 42, 47, 0.86)),
    var(--green);
  color: var(--parchment);
}

.confession-article-heading > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: var(--parchment);
  border-radius: 50%;
  font-weight: 850;
}

.confession-article-heading small {
  color: rgba(251, 247, 237, 0.72);
}

.confession-article-heading h3 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
}

.confession-body {
  display: grid;
  gap: 14px;
  padding: clamp(20px, 4vw, 34px);
}

.confession-block {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.88;
  white-space: pre-line;
}

.confession-block.is-heading {
  margin-top: 10px;
  color: var(--burgundy);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.45;
}

.standards-section,
.drive-section {
  background: #efe7d7;
}

.standards-band {
  padding: clamp(28px, 5vw, 48px);
  color: var(--parchment);
  background:
    linear-gradient(90deg, rgba(31, 70, 56, 0.97), rgba(31, 70, 56, 0.82)),
    url("assets/images/confessional-hero.jpg")
      center / cover;
  border-radius: 8px;
}

.standards-band h2 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
}

.standards-band p {
  max-width: 760px;
  color: rgba(251, 247, 237, 0.82);
}

.gathering-section {
  background: var(--paper);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.timeline-item {
  min-width: 0;
  padding: 24px 24px 0 0;
}

.timeline-item span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  color: var(--parchment);
  background: var(--burgundy);
  border-radius: 50%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.media-section {
  background: var(--parchment);
}

.course-hub {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.course-tabs-wrap {
  position: sticky;
  top: 92px;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.course-catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.course-tabs-wrap > p,
.course-catalog-head p,
.lesson-list-head h4,
.lesson-player-head span {
  margin: 0;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course-catalog-count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  color: var(--green);
  background: rgba(31, 70, 56, 0.08);
  border: 1px solid rgba(31, 70, 56, 0.16);
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
}

.course-search {
  display: block;
  margin-top: 12px;
}

.course-search input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.course-search input:focus {
  border-color: rgba(31, 70, 56, 0.48);
  box-shadow: 0 0 0 3px rgba(31, 70, 56, 0.1);
}

.course-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: calc(100svh - 220px);
  margin-top: 12px;
  overflow: auto;
  padding-right: 2px;
}

.course-tab,
.playlist-item {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}

.course-tab {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  color: var(--muted);
  background: #fbf7ed;
}

.course-tab-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--parchment);
  background: var(--green);
  border-radius: 50%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.course-tab-copy {
  min-width: 0;
}

.course-tab-copy strong,
.course-tab-copy small,
.playlist-item strong,
.playlist-item small {
  display: block;
}

.course-tab-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-tab-copy small {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-tab-count {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.course-tab.is-active {
  border-color: rgba(31, 70, 56, 0.45);
  background: #edf2ea;
  box-shadow: inset 0 0 0 1px rgba(31, 70, 56, 0.16);
}

.course-empty {
  padding: 16px 12px;
  color: var(--muted);
  background: var(--parchment);
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.5;
}

.course-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.course-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: clamp(24px, 4vw, 34px);
  color: var(--parchment);
  background:
    linear-gradient(90deg, rgba(31, 70, 56, 0.97), rgba(74, 42, 47, 0.86)),
    url("assets/images/worship-space.jpg") center / cover;
  border-radius: 8px;
}

.course-overview h3 {
  max-width: 780px;
  margin: 7px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.course-overview p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: rgba(251, 247, 237, 0.8);
  font-size: 16px;
  line-height: 1.65;
}

.course-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-stats span {
  display: grid;
  min-width: 86px;
  padding: 12px 14px;
  color: rgba(251, 247, 237, 0.72);
  background: rgba(251, 247, 237, 0.1);
  border: 1px solid rgba(251, 247, 237, 0.18);
  border-radius: 7px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
}

.course-stats strong {
  color: var(--parchment);
  font-size: 24px;
  line-height: 1;
}

.course-content {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.lesson-list-panel,
.lesson-player-panel {
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lesson-list-panel {
  position: sticky;
  top: 92px;
}

.lesson-list-head,
.lesson-player-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.lesson-player-head {
  background: #f8efe0;
}

.media-player {
  background: #111512;
}

.player-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #111512;
}

.player-frame video,
.player-frame audio {
  width: 100%;
}

.player-frame video {
  height: 100%;
  background: #050706;
  object-fit: contain;
}

.audio-cover {
  width: 100%;
  height: 100%;
  position: relative;
}

.audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-frame audio {
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: min(620px, calc(100% - 48px));
  transform: translateX(-50%);
}

.player-meta {
  padding: 22px 24px 24px;
  color: var(--parchment);
}

.player-meta span,
.player-meta p {
  color: rgba(251, 247, 237, 0.72);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.player-meta h3 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 36px);
}

.player-meta p {
  margin: 0;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  width: calc(100% - 36px);
  margin: 14px 18px;
  padding: 4px;
  background: var(--parchment);
  border-radius: 8px;
}

.segmented-control button {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.segmented-control button.is-active {
  color: var(--parchment);
  background: var(--green);
}

.segmented-control button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.media-count {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.playlist {
  display: grid;
  gap: 1px;
  max-height: 610px;
  overflow: auto;
  background: var(--line);
}

.playlist-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
}

.playlist-item img {
  width: 86px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}

.playlist-item strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-item small {
  margin-top: 4px;
  color: var(--muted);
}

.playlist-item.is-active {
  background: #f8efe0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.photo-grid figure {
  margin: 0;
  overflow: hidden;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.drive-app {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.drive-gate,
.drive-shell {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.drive-gate {
  display: grid;
  gap: 14px;
  max-width: 560px;
  padding: 26px;
}

.drive-gate strong,
.drive-gate span {
  display: block;
}

.drive-gate strong {
  margin-bottom: 6px;
  font-size: 24px;
}

.drive-gate span {
  color: var(--muted);
  line-height: 1.6;
}

.drive-gate label {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.password-row input,
.drive-search input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.password-row input {
  flex: 1 1 190px;
}

.drive-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  min-height: 620px;
  overflow: hidden;
}

.drive-sidebar,
.drive-details {
  min-width: 0;
  padding: 18px;
  background: #f8efe0;
}

.drive-sidebar {
  border-right: 1px solid var(--line);
}

.drive-details {
  border-left: 1px solid var(--line);
}

.drive-sidebar-title,
.drive-details h3 {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drive-folder-tree {
  display: grid;
  gap: 4px;
}

.drive-folder-node button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 8px 7px calc(8px + var(--depth) * 15px);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}

.drive-folder-node button.is-active {
  color: var(--parchment);
  background: var(--green);
}

.drive-folder-icon,
.drive-kind-icon {
  display: inline-block;
  width: 18px;
  height: 14px;
  background: var(--gold);
  border-radius: 3px;
}

.drive-kind-icon.is-file {
  width: 16px;
  height: 20px;
  background: var(--green-2);
  border-radius: 3px 3px 5px 5px;
}

.drive-browser {
  min-width: 0;
  background: var(--surface);
}

.drive-toolbar,
.drive-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.drive-search {
  flex: 1 1 240px;
}

.drive-search input {
  width: 100%;
}

.drive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drive-tool-button,
.drive-table-toolbar button,
.drive-row-action {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--green);
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
}

.drive-tool-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.drive-row-action.is-danger {
  color: var(--burgundy);
  background: rgba(123, 47, 47, 0.08);
  border-color: rgba(123, 47, 47, 0.24);
}

.drive-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.drive-crumbs button {
  padding: 5px 7px;
  color: var(--green);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 850;
}

.drive-table-toolbar span,
.drive-status,
.drive-details {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.drive-table-wrap {
  overflow: auto;
}

.drive-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.drive-table th,
.drive-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.drive-table th {
  color: var(--muted);
  background: #fbf7ed;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.drive-table tr.is-selected td {
  background: #edf2ea;
}

.drive-name-cell {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.drive-name-cell strong,
.drive-name-cell small,
.drive-details li {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-name-cell strong {
  color: var(--ink);
  font-size: 15px;
}

.drive-name-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.drive-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--muted);
}

.drive-status {
  min-height: 22px;
  margin: 0;
  padding: 12px 16px;
}

.drive-details p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.drive-details ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.admin-app {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.admin-auth-grid,
.admin-login,
.admin-loading,
.admin-shell {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-loading {
  max-width: 560px;
  padding: 28px;
  color: var(--muted);
}

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

.admin-login {
  display: grid;
  gap: 12px;
  padding: 28px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.admin-login-only {
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-header {
  grid-template-columns: minmax(210px, 1fr) auto;
}

.admin-login strong,
.admin-login span {
  display: block;
}

.admin-login strong {
  margin-bottom: 6px;
  font-size: 24px;
}

.admin-login span {
  color: var(--muted);
  line-height: 1.6;
}

.admin-login small,
.admin-inline-form small,
.admin-inline-form p {
  color: var(--muted);
  line-height: 1.55;
}

.admin-login label,
.admin-field span {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-login input,
.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-field textarea {
  resize: vertical;
  line-height: 1.55;
}

.admin-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 660px;
  overflow: hidden;
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  background: #f8efe0;
  border-right: 1px solid var(--line);
}

.admin-account {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-account span,
.admin-security-grid span {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
}

.admin-account strong {
  font-size: 18px;
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar nav button,
.admin-logout {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  color: var(--green);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.admin-sidebar nav button.is-active {
  color: var(--parchment);
  background: var(--green);
}

.admin-logout {
  margin-top: 10px;
  color: var(--burgundy);
  background: rgba(123, 47, 47, 0.08);
  border-color: rgba(123, 47, 47, 0.18);
}

.admin-panel {
  min-width: 0;
  padding: 22px;
}

.admin-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-panel-head h3,
.admin-inline-form h4,
.admin-compact-form h4 {
  margin: 0;
  font-size: 24px;
}

.admin-panel-head p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-form {
  display: grid;
  gap: 16px;
}

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

.admin-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-field.is-wide {
  grid-column: 1 / -1;
}

.admin-inline-form,
.admin-compact-form,
.admin-security-grid article {
  padding: 18px;
  background: #fbf7ed;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-inline-form {
  margin-top: 18px;
}

.admin-users-table {
  margin-top: 18px;
}

.admin-drive-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  background: #f8efe0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

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

.admin-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.admin-current {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--green);
  background: rgba(31, 70, 56, 0.08);
  border: 1px solid rgba(31, 70, 56, 0.16);
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
}

.admin-security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-security-grid article {
  display: grid;
  gap: 8px;
}

.admin-security-grid strong {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.contact-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px;
  color: var(--parchment);
  background: var(--ink);
  border-radius: 8px;
}

.contact-band h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
}

.contact-band address {
  color: rgba(251, 247, 237, 0.78);
  font-style: normal;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(20px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .confession-grid,
  .confession-reader,
  .about-grid,
  .timeline,
  .course-hub,
  .course-tabs,
  .course-content,
  .admin-auth-grid,
  .drive-shell,
  .admin-shell,
  .admin-field-grid,
  .admin-drive-actions,
  .admin-security-grid {
    grid-template-columns: 1fr;
  }

  .drive-sidebar,
  .drive-details,
  .admin-sidebar {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-sidebar nav button {
    text-align: center;
  }

  .lesson-list-panel {
    position: static;
  }

  .confession-toc,
  .course-tabs-wrap {
    position: static;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .site-header {
    align-items: start;
    gap: 8px;
    padding-bottom: 10px;
  }

  .language-switch {
    justify-self: end;
  }

  .hero {
    min-height: 76svh;
    padding-top: 70px;
    padding-bottom: 24px;
  }

  .hero h1 {
    max-width: 9ch;
    font-size: 48px;
    line-height: 1;
  }

  body[data-lang="en"] .hero h1 {
    max-width: 10ch;
    font-size: 40px;
  }

  .hero h1 small {
    font-size: 19px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .service-strip {
    gap: 8px 14px;
    margin-top: 28px;
    padding-top: 14px;
  }

  .service-strip span:last-child {
    flex-basis: 100%;
  }

  .section {
    scroll-margin-top: 230px;
    padding-top: 44px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .confession-intro {
    grid-template-columns: 1fr;
  }

  .confession-card {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 18px;
  }

  .confession-card > span {
    width: 42px;
    height: 42px;
  }

  .confession-reader {
    gap: 12px;
  }

  .confession-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .confession-article-heading {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .confession-article-heading > span {
    width: 40px;
    height: 40px;
  }

  .confession-block {
    font-size: 16px;
    line-height: 1.82;
  }

  .course-tabs {
    max-height: 360px;
  }

  .playlist-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .playlist-item img {
    width: 72px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .contact-band {
    padding: 24px;
  }

  .drive-shell {
    min-height: auto;
  }

  .admin-shell {
    min-height: auto;
  }

  .drive-toolbar,
  .drive-table-toolbar,
  .admin-panel-head {
    align-items: stretch;
  }

  .drive-actions,
  .drive-search,
  .drive-tool-button {
    width: 100%;
  }

  .drive-file strong,
  .drive-file small,
  .drive-name-cell strong,
  .drive-name-cell small,
  .admin-table td {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-panel,
  .admin-login {
    padding: 18px;
  }

  .admin-sidebar nav {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 430px) {
  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small {
    font-size: 11px;
  }

  .site-nav a {
    padding: 8px 7px;
  }

  .confession-toc nav {
    grid-template-columns: 1fr;
  }

  .course-tab {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .course-tab-count {
    grid-column: 2;
    justify-self: start;
  }
}
