:root {
  --ink: #1b1715;
  --muted: #68625c;
  --paper: #fbf7ef;
  --paper-2: #f0e5d6;
  --gold: #d8a239;
  --red: #b7372d;
  --teal: #0f6f68;
  --green: #647f45;
  --blue: #264f82;
  --night: #181b22;
  --line: rgba(52, 35, 23, 0.16);
  --shadow: 0 22px 70px rgba(39, 24, 16, 0.16);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbf7ef;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a.button {
  font: inherit;
}

#temple-sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 15%, rgba(216, 162, 57, 0.24), transparent 30%),
    radial-gradient(circle at 78% 28%, rgba(15, 111, 104, 0.24), transparent 28%),
    linear-gradient(145deg, #12151d 0%, #341b1d 38%, #783229 72%, #d8a239 120%);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: #fff9eb;
  background: linear-gradient(180deg, rgba(14, 16, 21, 0.86), rgba(14, 16, 21, 0));
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 249, 235, 0.2), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.site-nav {
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 15px;
}

.site-nav a {
  padding: 8px 4px;
  opacity: 0.86;
}

.site-nav a:hover {
  opacity: 1;
}

.section-band {
  position: relative;
  padding: 104px clamp(18px, 5vw, 72px);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(26px, 4vw, 64px);
  color: #fff9eb;
  padding-top: 128px;
  padding-bottom: 132px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 24vh;
  background:
    linear-gradient(180deg, rgba(251, 247, 239, 0), var(--paper) 78%),
    repeating-linear-gradient(90deg, rgba(24, 27, 34, 0.36) 0 10px, transparent 10px 34px);
  z-index: -1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #f2cc70;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
}

h1 {
  max-width: 8ch;
  font-size: clamp(58px, 9vw, 116px);
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(30px, 5vw, 58px);
  letter-spacing: 0;
}

h3 {
  font-size: 24px;
}

.hero-text {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 249, 235, 0.86);
  font-size: clamp(18px, 1.6vw, 23px);
}

.hero-actions,
.row-heading,
.tabbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.primary {
  color: #fff9eb;
  background: var(--red);
  border-color: rgba(255, 249, 235, 0.22);
}

.button.ghost {
  color: #fff9eb;
  background: rgba(255, 249, 235, 0.12);
  border-color: rgba(255, 249, 235, 0.42);
}

.button.small {
  min-height: 40px;
  padding: 8px 14px;
}

.temple-visual {
  position: relative;
  display: grid;
  align-self: stretch;
  align-content: stretch;
  min-height: 600px;
  isolation: isolate;
}

.temple-visual::before {
  content: "";
  position: absolute;
  inset: 10% -8% 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 162, 57, 0.32), transparent 62%);
  filter: blur(10px);
}

.temple-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 249, 235, 0.18);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.temple-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(18, 21, 29, 0.15), rgba(18, 21, 29, 0.02) 34%, rgba(18, 21, 29, 0.25)),
    linear-gradient(180deg, transparent 55%, rgba(18, 21, 29, 0.76));
  pointer-events: none;
}

.hero-status {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.18);
  margin: 0 18px 18px;
}

.stats-strip,
.oracle-panel {
  border: 1px solid rgba(255, 249, 235, 0.22);
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.12);
  backdrop-filter: blur(12px);
}

.hero-status > div {
  padding: 16px;
  background: rgba(18, 21, 29, 0.44);
}

.status-number {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.status-label {
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 14px;
  opacity: 0.82;
}

.intro {
  background: var(--paper);
}

.notice-band {
  padding-top: 32px;
  padding-bottom: 32px;
  color: #fff9eb;
  background: #181b22;
}

.notice-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.notice-grid strong {
  color: #f0be52;
  font-family: "Noto Serif TC", serif;
  font-size: 28px;
}

.notice-grid p {
  margin: 0;
  color: rgba(255, 249, 235, 0.78);
}

.poster-cut::before {
  content: "網府常昭";
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  top: 48px;
  opacity: 0.08;
  color: var(--red);
  font-family: "Noto Serif TC", serif;
  font-size: clamp(64px, 12vw, 160px);
  font-weight: 900;
  writing-mode: vertical-rl;
  line-height: 0.9;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: clamp(28px, 7vw, 96px);
  align-items: center;
}

.split > p,
.oracle .split p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.deities,
.offerings,
.practice {
  background: #f2e7d8;
}

.project-status {
  background: #faf4ea;
}

.section-heading {
  margin-bottom: 28px;
}

.row-heading {
  justify-content: space-between;
}

.media-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: center;
}

.media-heading img {
  width: 100%;
  max-height: none;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  padding: 10px;
  background: #111;
  box-shadow: var(--shadow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(22, 99, 93, 0.22);
  border-radius: 999px;
  padding: 7px 13px;
  color: var(--teal);
  background: rgba(22, 99, 93, 0.08);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

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

.progress-grid article {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 252, 244, 0.74);
}

.progress-grid strong,
.progress-grid span {
  display: block;
}

.progress-grid strong {
  font-size: 20px;
}

.progress-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 14px;
}

.progress-grid article::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--gold);
}

.progress-grid .done::before {
  background: var(--teal);
}

.progress-grid .watch::before {
  background: var(--gold);
}

.progress-grid .hold::before {
  background: var(--red);
}

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

.deity-grid article,
.offering-grid article,
.courtyard-list article,
.lamp-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.84);
  box-shadow: 0 12px 34px rgba(54, 31, 18, 0.07);
}

.deity-grid article,
.offering-grid article {
  min-height: 210px;
  padding: 24px;
}

.deity-grid p,
.offering-grid p,
.courtyard-list p {
  margin: 12px 0 0;
  color: var(--muted);
}

.deity-feature {
  position: relative;
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  overflow: hidden;
  color: #fff9eb;
  background:
    linear-gradient(135deg, rgba(24, 27, 34, 0.36), rgba(24, 27, 34, 0.08)),
    linear-gradient(135deg, #173f55, #b7372d 58%, #d8a239) !important;
}

.deity-feature > img {
  width: 100%;
  height: 330px;
  border-radius: 6px;
  object-fit: cover;
  object-position: top center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.deity-feature p {
  color: rgba(255, 249, 235, 0.82);
}

.deity-seal {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 249, 235, 0.58);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 800;
}

.lights {
  background: #fcf8f0;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--ink);
  background: var(--line);
  backdrop-filter: none;
}

.stats-strip div {
  min-height: 90px;
  padding: 18px;
  background: #fffaf1;
}

.stats-strip strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.stats-strip span,
.offering-grid span,
.courtyard-list span,
.lamp-meta,
.lamp-platform {
  color: var(--muted);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 13px;
}

.tabbar {
  margin: 22px 0;
}

.tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.tab.is-active {
  color: #fff9eb;
  background: var(--teal);
  border-color: var(--teal);
}

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

.lamp-card {
  position: relative;
  min-height: 158px;
  padding: 18px 18px 18px 72px;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf8, #f7efe3);
}

.lamp-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 36px;
  height: 52px;
  border-radius: 18px 18px 14px 14px;
  background: var(--lamp-color, var(--gold));
  box-shadow: 0 0 22px color-mix(in srgb, var(--lamp-color, var(--gold)) 56%, transparent);
}

.lamp-card h3 {
  font-size: 21px;
}

.lamp-meta {
  margin-top: 8px;
}

.lamp-platform {
  display: inline-flex;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
}

.offering-grid article {
  background: #fffaf0;
}

.deity-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.deity-card > img {
  width: 100%;
  height: 220px;
  border-radius: 6px;
  object-fit: cover;
  object-position: top center;
}

.full-deities {
  align-items: stretch;
}

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

.offering-card {
  min-height: 0 !important;
  display: grid;
  align-content: start;
}

.offering-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: contain;
  background: #111;
  margin-bottom: 12px;
}

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

.chapter-grid article,
.live-grid article,
.embed-shell,
.link-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.86);
  box-shadow: var(--shadow);
}

.chapter-grid article,
.live-grid article {
  overflow: hidden;
  padding: 18px;
}

.chapter-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 16px;
}

.portrait-panel {
  width: 100%;
  max-height: 680px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top center;
  box-shadow: var(--shadow);
}

.embed-shell {
  overflow: hidden;
  padding: 0;
}

.embed-shell iframe {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  border: 0;
}

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

.lights-hero .text-hero-bg {
  background:
    linear-gradient(90deg, rgba(18, 21, 29, 0.72), rgba(18, 21, 29, 0.2)),
    url("/assets/lanterns/lantern-sheet.png") center / cover;
}

.divine-hero .text-hero-bg {
  background:
    linear-gradient(90deg, rgba(18, 21, 29, 0.72), rgba(18, 21, 29, 0.2)),
    url("/assets/art/oracle-bamboo.png") center / cover;
}

.oracle {
  color: #fff9eb;
  background:
    radial-gradient(circle at 82% 22%, rgba(216, 162, 57, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(18, 21, 29, 0.96), rgba(15, 70, 66, 0.9)),
    #172729;
}

.genesis {
  color: #fff9eb;
  background:
    linear-gradient(90deg, rgba(183, 55, 45, 0.94), rgba(24, 27, 34, 0.88)),
    repeating-linear-gradient(135deg, rgba(216, 162, 57, 0.16) 0 2px, transparent 2px 18px);
}

.genesis-wrap {
  position: relative;
  padding-left: clamp(0px, 5vw, 80px);
}

.genesis blockquote {
  margin: 0;
  max-width: 840px;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(32px, 5.6vw, 76px);
  font-weight: 900;
  line-height: 1.24;
}

.genesis span {
  display: block;
  margin-top: 22px;
  color: rgba(255, 249, 235, 0.72);
}

.genesis .button {
  margin-top: 28px;
}

.text-page {
  background: #fbf7ef;
}

.text-page .site-header {
  background: linear-gradient(180deg, rgba(14, 16, 21, 0.92), rgba(14, 16, 21, 0.2));
}

.text-hero {
  position: relative;
  min-height: 58vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 150px clamp(18px, 5vw, 72px) 80px;
  color: #fff9eb;
  background: #181b22;
}

.text-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 21, 29, 0.72), rgba(18, 21, 29, 0.24)),
    url("./assets/art/temple-exterior-02.png") center / cover;
  filter: saturate(1.05);
}

.text-hero .section-inner {
  position: relative;
}

.text-hero h1 {
  max-width: 9ch;
  font-size: clamp(56px, 10vw, 120px);
}

.text-hero p:last-child {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 249, 235, 0.82);
  font-size: clamp(18px, 2vw, 26px);
}

.scripture {
  padding: 82px clamp(18px, 5vw, 72px);
  color: var(--ink);
}

.scripture h1 {
  display: none;
}

.scripture h2 {
  margin: 76px 0 24px;
  color: var(--red);
  font-size: clamp(34px, 5vw, 62px);
}

.scripture h2:first-of-type {
  margin-top: 0;
}

.scripture p,
.scripture blockquote {
  max-width: 820px;
}

.scripture p {
  margin: 0 0 28px;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 2;
}

.scripture blockquote {
  margin: 0 0 44px;
  border-left: 6px solid var(--gold);
  padding-left: 22px;
  color: var(--muted);
  font-size: 20px;
}

.scripture strong {
  color: var(--red);
}

.scripture hr {
  max-width: 820px;
  margin: 54px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.oracle .eyebrow {
  color: #f2cc70;
}

.oracle h2 {
  color: #fff9eb;
}

.oracle-panel {
  padding: clamp(24px, 4vw, 42px);
  color: #fff9eb;
}

.art-panel {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
}

.art-panel img {
  width: 100%;
  height: min(42vw, 360px);
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
}

.oracle-panel p {
  min-height: 110px;
  margin: 0 0 28px !important;
  color: #fff9eb !important;
  font-size: clamp(24px, 4vw, 42px) !important;
  line-height: 1.45;
}

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

.courtyard-list article {
  padding: 20px;
}

.courtyard-list strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: #fff9eb;
  background: #241410;
  font-family: "Noto Sans TC", system-ui, sans-serif;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 14px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 100svh;
    padding-top: 150px;
  }

  .temple-visual {
    min-height: 460px;
  }

  .deity-feature {
    grid-template-columns: 1fr;
  }

  .media-heading,
  .art-panel {
    grid-template-columns: 1fr;
  }

  .status-number {
    font-size: 30px;
  }

  .deity-grid,
  .offering-grid,
  .progress-grid,
  .lantern-grid,
  .chapter-grid,
  .live-grid,
  .lamp-board,
  .courtyard-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .section-band {
    padding: 70px 16px;
  }

  .hero {
    padding-top: 148px;
  }

  h1 {
    font-size: clamp(48px, 17vw, 76px);
  }

  h2 {
    font-size: 32px;
  }

  .hero-status,
  .deity-grid,
  .offering-grid,
  .progress-grid,
  .lantern-grid,
  .chapter-grid,
  .live-grid,
  .link-list,
  .lamp-board,
  .courtyard-list,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .notice-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .deity-feature {
    grid-column: auto;
  }

  .deity-feature > img {
    height: 360px;
  }

  .site-footer {
    flex-direction: column;
  }
}
