:root {
  --gold: #C9A961;
  --gold-deep: #A8863F;
  --maroon: #7A1F1F;
  --maroon-deep: #5A1313;
  --cream: #FBF7EE;
  --cream-2: #F3EBD8;
  --ink: #2B1E15;
  --ink-2: #4A3A2D;
  --muted: #7c6a58;
  --line: #E8DCC2;
  --shadow: 0 10px 30px rgba(60, 40, 15, 0.08);
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Sarabun", "Segoe UI", Tahoma, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Prompt", "Sarabun", sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.2px;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 760px; margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--maroon-deep);
  display: grid; place-items: center; font-weight: 700; font-size: 1.3rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 4px 10px rgba(168,134,63,.35);
  overflow: hidden;
  flex: 0 0 44px;
}
.brand-mark.has-logo {
  background: #fff;
  padding: 2px;
}
.brand-mark img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: "Prompt", sans-serif; font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: .8rem; }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-2); padding: 8px 12px; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { background: var(--cream-2); text-decoration: none; color: var(--maroon); }
.site-nav a.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--maroon-deep);
}

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 20px;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.open { max-height: 500px; }
  .site-nav a { padding: 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(251,247,238,0) 0%, rgba(251,247,238,1) 90%),
    radial-gradient(ellipse at 50% -10%, #e7cc88 0%, transparent 60%),
    linear-gradient(135deg, #2a0f0f 0%, #5a1313 55%, #7a1f1f 100%);
  color: #f6eacb;
  padding: 110px 0 130px;
  overflow: hidden;
  text-align: center;
}
.hero.hero-slim {
  padding: 60px 0 70px;
}
.hero.hero-slim h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero.hero-slim .hero-sub { font-size: 1.02rem; margin-bottom: 0; }
.hero-glow {
  position: absolute; inset: -40% -20% auto -20%; height: 80%;
  background: radial-gradient(ellipse at center, rgba(201,169,97,.35), transparent 60%);
  filter: blur(20px); pointer-events: none;
}
.hero-inner { position: relative; }
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(246, 234, 203, .15);
  color: #f6eacb; font-size: .9rem;
  border: 1px solid rgba(246, 234, 203, .3);
  margin-bottom: 18px;
}
.hero h1 { color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.35); margin-bottom: 14px; }
.hero-sub { color: rgba(246, 234, 203, .9); font-size: 1.15rem; max-width: 700px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-family: "Prompt", sans-serif; font-size: .98rem;
  transition: transform .15s, box-shadow .2s, background .2s;
  cursor: pointer; border: 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--maroon-deep);
  box-shadow: 0 6px 18px rgba(168,134,63,.35);
}
.btn-primary:hover { transform: translateY(-1px); text-decoration: none; }
.btn-ghost {
  background: transparent; color: #f6eacb;
  border: 1px solid rgba(246, 234, 203, .5);
}
.btn-ghost:hover { background: rgba(246, 234, 203, .1); text-decoration: none; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--cream-2); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2::after {
  content: ""; display: block; width: 54px; height: 3px; margin: 12px auto 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep)); border-radius: 2px;
}
.section-head-row {
  display: flex; justify-content: space-between; align-items: end; gap: 20px;
  text-align: left; margin-bottom: 32px; flex-wrap: wrap;
}
.section-head-row h2::after { margin: 12px 0 0; }
.section-head-row .lead { margin: 0; }

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(60,40,15,.12); }
.card h3 { color: var(--maroon); margin-bottom: 10px; }
.card .tag {
  display: inline-block; font-size: .8rem; font-weight: 600;
  color: var(--gold-deep); background: #fff7e3; padding: 2px 10px;
  border-radius: 999px; margin-bottom: 10px;
}
.card .date { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- Timeline (abbots) ---------- */
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 720px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 18px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, var(--gold), transparent);
}
.timeline li {
  position: relative; padding: 14px 16px 14px 50px; margin: 0 0 8px;
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.timeline li::before {
  content: ""; position: absolute; left: 10px; top: 22px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line);
}
.timeline li .order { font-size: .8rem; color: var(--muted); }
.timeline li .name { font-family: "Prompt", sans-serif; font-weight: 600; font-size: 1.05rem; display: block; color: var(--ink); }
.timeline li .period { font-size: .9rem; color: var(--gold-deep); }

/* ---------- Current abbot card ---------- */
.abbot-card {
  margin-top: 50px; background: #fff; border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
}
.abbot-card h3 { color: var(--maroon); margin-bottom: 14px; }
.abbot-name { font-size: 1.35rem; font-weight: 700; font-family: "Prompt", sans-serif; color: var(--ink); margin: 0 0 20px; }
.abbot-group {
  margin: 20px 0 10px;
  padding-bottom: 6px;
  color: var(--gold-deep);
  font-family: "Prompt", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px dashed var(--line);
}
.abbot-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 4px; }
.abbot-meta dt { color: var(--muted); font-weight: 600; white-space: nowrap; }
.abbot-meta dd { margin: 0; }
.abbot-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}
.abbot-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  border-bottom: 1px dotted var(--line);
}
.abbot-list li:last-child { border-bottom: 0; }
.abbot-list li::before {
  content: "•";
  position: absolute; left: 4px;
  color: var(--gold-deep); font-weight: 700;
}
.abbot-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .92rem;
  font-style: italic;
}
.abbot-card ul:not(.abbot-list) { padding-left: 20px; margin: 0 0 12px; }

/* ---------- Calendar ---------- */
.calendar-card {
  max-width: 860px; margin: 0 auto;
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 28px;
}
.calendar-months {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-top: 14px;
}
.calendar-months .m {
  text-align: center; padding: 14px 8px; border-radius: 10px;
  background: var(--cream-2); font-weight: 600; font-family: "Prompt", sans-serif;
  color: var(--maroon-deep); font-size: .95rem;
}
@media (max-width: 560px) { .calendar-months { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-line { margin: 6px 0; }
.map-wrap {
  aspect-ratio: 16 / 10; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- News cards ---------- */
.news-card { display: flex; flex-direction: column; }
.news-card .news-thumb {
  height: 180px; border-radius: 10px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--cream-2), var(--line));
  display: grid; place-items: center; color: var(--gold-deep);
  font-family: "Prompt", sans-serif; font-size: 3rem;
}
.news-card .news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .fb-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #1877F2; color: #fff; font-size: .75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #2a1a10; color: #e8d9bf; padding: 28px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  align-items: center;
}
.footer-inner a { color: var(--gold); }
.footer-right { text-align: right; }

/* ---------- Abbot photos ---------- */
.timeline li.has-photo {
  padding-left: 92px;
  min-height: 72px;
}
.timeline li .abbot-photo {
  position: absolute; left: 38px; top: 14px;
  width: 54px; height: 54px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--cream-2);
}
.timeline li.has-photo::before { display: none; }
.abbot-info { display: flex; flex-direction: column; gap: 2px; }

.abbot-card.with-photo {
  display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start;
}
.abbot-main-photo {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 12px; border: 3px solid var(--gold);
  box-shadow: 0 8px 20px rgba(60,40,15,.15);
}
@media (max-width: 640px) {
  .abbot-card.with-photo { grid-template-columns: 1fr; }
  .abbot-main-photo { max-width: 200px; margin: 0 auto; }
}

/* ---------- Card gallery (sacred items, ceremonies) ---------- */
.card-gallery {
  display: grid; gap: 6px; margin-bottom: 14px; border-radius: 10px; overflow: hidden;
}
.card-gallery a { display: block; overflow: hidden; border-radius: 6px; }
.card-gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.card-gallery a:hover img { transform: scale(1.05); }
.card-gallery[data-count="1"] img { aspect-ratio: 4/3; }
.card-gallery[data-count="2"] { grid-template-columns: 1fr 1fr; }
.card-gallery[data-count="2"] img { aspect-ratio: 1/1; }
.card-gallery[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.card-gallery[data-count="3"] a:first-child { grid-row: 1 / span 2; }
.card-gallery[data-count="3"] img { aspect-ratio: auto; height: 100%; min-height: 90px; }
.card-gallery:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]) {
  grid-template-columns: repeat(3, 1fr); grid-auto-rows: 80px;
}
.card-gallery:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]) a:first-child {
  grid-column: 1 / -1; grid-row: 1 / span 2;
}
.card-gallery:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]) img {
  aspect-ratio: auto; height: 100%;
}

/* ---------- Bank card ---------- */
.bank-card {
  margin-top: 22px;
  background: linear-gradient(135deg, #fff 0%, #fff7e3 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.bank-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px dashed var(--line);
}
.bank-head strong {
  font-family: "Prompt", sans-serif; color: var(--maroon); font-size: 1.1rem;
  display: block;
}
.bank-head small { color: var(--muted); font-size: .88rem; }
.bank-ico {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--maroon-deep);
  display: grid; place-items: center;
  font-family: "Prompt", sans-serif; font-size: 1.5rem; font-weight: 700;
}
.bank-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.bank-meta dt { color: var(--muted); font-weight: 600; font-size: .92rem; }
.bank-meta dd { margin: 0; font-weight: 500; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.acct-no {
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 1.05rem;
  letter-spacing: 1px;
  color: var(--maroon-deep);
  background: #fff;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.copy-btn {
  background: var(--cream-2); border: 1px solid var(--line);
  color: var(--ink-2); padding: 3px 12px;
  border-radius: 999px; font-size: .82rem; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.copy-btn:hover { background: var(--gold); color: var(--maroon-deep); border-color: var(--gold); }
.copy-btn.copied { background: #2e7d32; color: #fff; border-color: #2e7d32; }

/* ---------- Home tiles ---------- */
.home-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 860px) { .home-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .home-tiles { grid-template-columns: 1fr; } }
.tile {
  background: #fff; border-radius: var(--radius);
  padding: 24px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  overflow: hidden;
}
.tile:hover {
  transform: translateY(-3px); text-decoration: none;
  border-color: var(--gold);
  box-shadow: 0 14px 36px rgba(168,134,63,.2);
}
.tile-ico {
  font-size: 2rem; margin-bottom: 10px;
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--cream-2), #fff7e3);
  display: grid; place-items: center;
}
.tile-cover {
  width: calc(100% + 44px); margin: -24px -22px 16px;
  height: 150px; overflow: hidden;
}
.tile-cover img { width: 100%; height: 100%; object-fit: cover; }
.tile h3 { color: var(--maroon); margin-bottom: 10px; }
.tile p { color: var(--ink-2); margin: 0 0 16px; flex: 1; font-size: .95rem; line-height: 1.65; }
.tile-link { color: var(--gold-deep); font-weight: 600; font-family: "Prompt", sans-serif; font-size: .95rem; }

/* Bank card CTA variant on home */
.bank-card-cta { max-width: 720px; margin: 0 auto; }

/* ---------- News filter ---------- */
.news-filter {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.news-filter input[type=search] {
  flex: 1 1 260px;
  padding: 11px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  font: inherit; background: #fff;
}
.news-filter input[type=search]:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,97,.25);
}

.news-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.chip {
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: .88rem; color: var(--ink-2);
}
.chip:hover { background: var(--cream-2); text-decoration: none; color: var(--maroon); }
.chip.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--maroon-deep); border-color: var(--gold-deep); font-weight: 600;
}

.news-more {
  margin: 10px 0; padding: 8px 0;
  border-top: 1px dotted var(--line);
}
.news-more summary {
  cursor: pointer; color: var(--gold-deep);
  font-weight: 600; font-size: .9rem;
  list-style: none;
}
.news-more summary::before { content: "▸ "; }
.news-more[open] summary::before { content: "▾ "; }
.news-more p { margin-top: 8px; font-size: .95rem; }

/* Button variant needed for public pages */
.btn-ghost-dark {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line);
  display: inline-block; padding: 10px 18px;
  border-radius: 999px; font-weight: 600;
  font-family: "Prompt", sans-serif; font-size: .95rem;
}
.btn-ghost-dark:hover { background: var(--cream-2); text-decoration: none; }

/* ---------- Sacred listing (names + thumbs, click to detail) ---------- */
.sacred-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.sacred-tile {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.sacred-tile:hover {
  transform: translateY(-3px); text-decoration: none;
  border-color: var(--gold);
  box-shadow: 0 14px 36px rgba(168,134,63,.2);
}
.sacred-tile-thumb {
  aspect-ratio: 4/3;
  background: var(--cream-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.sacred-tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sacred-tile-thumb.empty span {
  font-size: 3rem; color: var(--gold-deep); font-family: "Prompt", sans-serif;
}
.sacred-tile-body {
  padding: 16px 18px;
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: flex-start;   /* align to top */
}
.sacred-tile-body h3 {
  margin: 0 0 8px;
  color: var(--maroon);
  font-size: 1.05rem;
}
/* Summary inside the sacred list tile — match home tile text style */
.sacred-tile-body .detail-summary {
  font-size: .95rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.sacred-tile-link {
  color: var(--gold-deep);
  font-weight: 600;
  font-family: "Prompt", sans-serif;
  font-size: .9rem;
}

/* ---------- Detail page (sacred detail view) ---------- */
.detail-container { max-width: 880px; }
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--gold-deep);
  font-weight: 600;
}
.back-link:hover { color: var(--maroon); text-decoration: underline; }
.detail-article {
  background: #fff; border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.detail-gallery {
  display: grid; gap: 8px; margin-bottom: 24px;
  border-radius: 12px; overflow: hidden;
}
.detail-gallery[data-count="1"] img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.detail-gallery[data-count="2"] { grid-template-columns: 1fr 1fr; }
.detail-gallery[data-count="2"] img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.detail-gallery[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.detail-gallery[data-count="3"] a:first-child { grid-row: 1 / span 2; }
.detail-gallery:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]) {
  grid-template-columns: repeat(4, 1fr);
}
.detail-gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.detail-gallery a { overflow: hidden; border-radius: 8px; display: block; }
.detail-gallery a:hover img { transform: scale(1.03); }
.detail-title { color: var(--maroon); margin: 0 0 10px; font-size: 1.6rem; }
.detail-summary {
  font-size: 1.1rem; color: var(--ink-2);
  padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.detail-body { line-height: 1.9; font-size: 1.02rem; }

/* ---------- Multiple banks layout ---------- */
.banks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.banks-grid .bank-card {
  margin-top: 0;
  position: relative;
}
.bank-qr {
  margin-top: 14px;
  text-align: center;
}
.bank-qr img {
  width: 160px; height: 160px; object-fit: contain;
  border-radius: 8px; padding: 6px; background: #fff;
  border: 1px solid var(--line);
}
.bank-note {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-style: italic;
}

/* ---------- Calendar grid ---------- */
.year-picker {
  display: flex; justify-content: center; align-items: center;
  gap: 18px; margin-bottom: 30px; flex-wrap: wrap;
}
.year-picker-title {
  margin: 0; font-size: 1.4rem; color: var(--maroon);
  min-width: 180px; text-align: center;
}
.year-picker-title small { color: var(--muted); font-size: .85rem; font-weight: 400; }

.cal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 960px) { .cal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cal-grid { grid-template-columns: 1fr; } }

.cal-month {
  background: #fff; border-radius: 12px;
  padding: 16px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.cal-month.has-events {
  border-color: var(--gold);
  box-shadow: 0 6px 22px rgba(168,134,63,.15);
}
.cal-month-title {
  margin: 0 0 10px; text-align: center;
  color: var(--maroon); font-size: 1.05rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.cal-week-header {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; margin-bottom: 4px;
}
.cal-week-header span {
  text-align: center; font-size: .75rem; color: var(--muted);
  font-weight: 600; padding: 4px 0;
}
.cal-week-header span.sun { color: #c62828; }
.cal-week-header span.sat { color: #6a4bc1; }

.cal-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  font-size: .85rem;
  border-radius: 6px;
  color: var(--ink-2);
}
.cal-day .dnum { line-height: 1; }
.cal-day.empty { visibility: hidden; }
.cal-day.sun { color: #c62828; }
.cal-day.sat { color: #6a4bc1; }
.cal-day.today {
  background: var(--gold);
  color: var(--maroon-deep) !important;
  font-weight: 700;
}
.cal-day.has-event {
  background: #fff7e3;
  font-weight: 700;
  color: var(--maroon);
  text-decoration: none;
}
.cal-day.has-event:hover { background: var(--gold); text-decoration: none; }
.cal-day.has-event .dot {
  position: absolute; bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--maroon);
}
.cal-day.today.has-event .dot { background: #fff; }

/* Event table */
.event-table-wrap {
  background: #fff; border-radius: var(--radius);
  overflow-x: auto; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.event-table {
  width: 100%; border-collapse: collapse;
  font-size: .95rem;
}
.event-table thead {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  color: #fff;
}
.event-table th {
  padding: 14px 16px; text-align: left;
  font-family: "Prompt", sans-serif; font-weight: 600;
  font-size: .92rem;
}
.event-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.event-table tbody tr:hover { background: var(--cream); }
.event-table tbody tr:target {
  background: #fff7e3; animation: flashTarget 1.5s ease;
}
@keyframes flashTarget {
  0%, 50% { background: var(--gold); }
  100% { background: #fff7e3; }
}
.event-table .evt-date { color: var(--maroon); white-space: nowrap; min-width: 140px; }
.event-table .evt-desc { margin: 4px 0 0; line-height: 1.5; }
.event-table .tag { margin: 0; }

@media (max-width: 640px) {
  .event-table th, .event-table td { padding: 10px 12px; font-size: .88rem; }
  .event-table .evt-date { min-width: 100px; }
}

/* ---------- Utility ---------- */
.empty { color: var(--muted); text-align: center; padding: 30px; font-style: italic; }
