/* KTR ktr.guru — based on the BHSMC theme: maroon primary, gold accents. Mobile first. */
:root {
  --bh-red: #b91c1c;
  --bh-red-dark: #7f1d1d;
  --bh-red-soft: #fdf2f2;
  --bh-gold: #f2b705;
  --bh-gold-soft: #fff8e1;
  --bh-blue: #1e5aa8;
  --bh-green: #2e7d4f;
  --bh-ink: #2b2220;
  --bh-muted: #6b5f5c;
  --bh-cream: #fffaf5;
  --bh-radius: 1rem;
  --bh-shadow: 0 10px 30px rgba(127, 29, 29, .08);
  --bh-shadow-lg: 0 20px 50px rgba(127, 29, 29, .16);
  --bs-primary: var(--bh-red);
  --bs-primary-rgb: 185, 28, 28;
  --bs-link-color: var(--bh-red);
  --bs-link-color-rgb: 185, 28, 28;
  --bs-link-hover-color: var(--bh-red-dark);
  --bs-link-hover-color-rgb: 127, 29, 29;
  --bs-body-font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --bs-body-color: var(--bh-ink);
  --bs-border-radius: .75rem;
  --bs-success: var(--bh-green);
  --bs-success-rgb: 46, 125, 79;
  --bs-warning: var(--bh-gold);
  --bs-warning-rgb: 242, 183, 5;
  --bs-info: var(--bh-blue);
  --bs-info-rgb: 30, 90, 168;
  --tabbar-h: 64px;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: #fff; padding-bottom: var(--tabbar-h); letter-spacing: .02em; }
@media (min-width: 992px) { body { padding-bottom: 0; } }
.font-serif, h1, h2, h3, .display-title { font-family: "Noto Serif TC", serif; }
::selection { background: var(--bh-red); color: #fff; }
img { max-width: 100%; }
.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* ---- buttons */
.btn { transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:active { transform: scale(.97); }
.btn-primary {
  --bs-btn-bg: var(--bh-red); --bs-btn-border-color: var(--bh-red);
  --bs-btn-hover-bg: var(--bh-red-dark); --bs-btn-hover-border-color: var(--bh-red-dark);
  --bs-btn-active-bg: var(--bh-red-dark); --bs-btn-active-border-color: var(--bh-red-dark);
  --bs-btn-disabled-bg: #d98a8a; --bs-btn-disabled-border-color: #d98a8a;
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(185, 28, 28, .3); transform: translateY(-1px); }
.btn-outline-primary {
  --bs-btn-color: var(--bh-red); --bs-btn-border-color: var(--bh-red);
  --bs-btn-hover-bg: var(--bh-red); --bs-btn-hover-border-color: var(--bh-red);
  --bs-btn-active-bg: var(--bh-red-dark); --bs-btn-active-border-color: var(--bh-red-dark);
}
.btn-gold { background: var(--bh-gold); color: var(--bh-red-dark); font-weight: 700; border: 0; }
.btn-gold:hover { background: #ffc928; color: var(--bh-red-dark); box-shadow: 0 8px 20px rgba(242, 183, 5, .4); transform: translateY(-1px); }
.btn-icon { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--bh-ink); }
.btn-icon:hover { background: var(--bh-red-soft); color: var(--bh-red); }
.text-primary { color: var(--bh-red) !important; }
.bg-primary { background-color: var(--bh-red) !important; }
.bg-cream { background: var(--bh-cream); }
.bg-red-soft { background: var(--bh-red-soft); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #e88; box-shadow: 0 0 0 .25rem rgba(185, 28, 28, .15); }
.form-check-input:checked { background-color: var(--bh-red); border-color: var(--bh-red); }

/* ---- header */
.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .07); }
.site-header::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--bh-red) 0 60%, var(--bh-gold) 60% 75%, var(--bh-blue) 75% 88%, var(--bh-green) 88%); }
.navbar { padding: .5rem 0; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--bh-red); color: var(--bh-gold); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: inset 0 0 0 3px rgba(242, 183, 5, .5); transition: transform .6s ease; }
.navbar-brand:hover .brand-mark { transform: rotate(180deg); }
.brand-mark-light { background: rgba(255, 255, 255, .1); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: "Noto Serif TC", serif; font-weight: 900; color: var(--bh-red-dark); font-size: 1.15rem; }
.brand-en { font-size: .65rem; color: var(--bh-muted); letter-spacing: .2em; text-transform: uppercase; }
.nav-link { font-weight: 500; color: var(--bh-ink); position: relative; padding: .6rem .8rem !important; border-radius: .5rem; }
.nav-link:hover, .nav-link.active { color: var(--bh-red) !important; }
@media (min-width: 992px) {
  .nav-link::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem; height: 2px; background: var(--bh-red); transform: scaleX(0); transition: transform .25s ease; transform-origin: center; }
  .nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
}
@media (max-width: 991.98px) {
  .offcanvas .nav-link { font-size: 1.1rem; padding: .85rem 1rem !important; border-bottom: 1px solid #f3e9e7; border-radius: 0; }
  .offcanvas .nav-link.active { background: var(--bh-red-soft); }
}
.burger { width: 24px; height: 18px; position: relative; display: inline-block; }
.burger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--bh-ink); border-radius: 2px; transition: .25s; }
.burger span:nth-child(1) { top: 0; } .burger span:nth-child(2) { top: 8px; } .burger span:nth-child(3) { top: 16px; }
.navbar-toggler:focus { box-shadow: none; }
.cart-badge { position: absolute; top: 2px; right: 0; background: var(--bh-gold); color: var(--bh-red-dark); font-size: .65rem; }
.cart-badge.bump { animation: bump .5s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }
.profile-nudge { background: var(--bh-gold-soft); color: #6b4e00; border-bottom: 1px solid #f6e1a1; }

/* ---- sections */
.section { padding: 3.5rem 0; }
@media (min-width: 992px) { .section { padding: 5.5rem 0; } }
.section-eyebrow { color: var(--bh-red); font-weight: 700; letter-spacing: .3em; font-size: .78rem; text-transform: uppercase; }
.section-title { font-weight: 900; font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--bh-red-dark); }
.section-title::after { content: ""; display: block; width: 48px; height: 4px; margin-top: .75rem; border-radius: 4px; background: linear-gradient(90deg, var(--bh-red), var(--bh-gold)); }
.text-center .section-title::after { margin-left: auto; margin-right: auto; }
.page-hero { background: radial-gradient(circle at 85% 20%, rgba(242, 183, 5, .25), transparent 40%), linear-gradient(135deg, var(--bh-red-dark), var(--bh-red)); color: #fff; padding: 3rem 0 2.5rem; position: relative; overflow: hidden; }
.page-hero::after { content: "☸"; position: absolute; right: -2rem; bottom: -4rem; font-size: 14rem; opacity: .07; line-height: 1; }
.page-hero h1 { font-weight: 900; font-size: clamp(1.8rem, 5vw, 3rem); }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .6); --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .85); }
.page-hero .breadcrumb a { color: #fff; }

/* ---- hero slider */
.hero { position: relative; }
.hero .carousel-item { height: 78vh; min-height: 460px; max-height: 760px; background: linear-gradient(135deg, var(--bh-red-dark), var(--bh-red)); }
.hero .slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s ease; }
.hero .carousel-item.active .slide-img { transform: scale(1); }
.hero .slide-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40, 6, 6, .15) 0%, rgba(40, 6, 6, .55) 55%, rgba(40, 6, 6, .85) 100%); }
.hero .slide-content { position: absolute; inset: auto 0 0 0; padding-bottom: 4.5rem; color: #fff; }
.hero h2 { font-size: clamp(2rem, 7vw, 4.2rem); font-weight: 900; text-shadow: 0 4px 30px rgba(0, 0, 0, .4); }
.hero .lead { max-width: 640px; opacity: .92; }
.hero .carousel-item.active .reveal-up { animation: revealUp .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .carousel-item.active .reveal-up.d2 { animation-delay: .15s; } .hero .carousel-item.active .reveal-up.d3 { animation-delay: .3s; }
@keyframes revealUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero .carousel-indicators [data-bs-target] { width: 28px; height: 4px; border-radius: 4px; background: var(--bh-gold); }
.hero-badge { display: inline-block; padding: .35rem .9rem; border: 1px solid rgba(242, 183, 5, .6); color: var(--bh-gold); border-radius: 999px; font-size: .8rem; letter-spacing: .2em; backdrop-filter: blur(4px); }
.scroll-hint { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); color: #fff; opacity: .7; animation: float 2s ease-in-out infinite; z-index: 3; }
@keyframes float { 50% { transform: translate(-50%, 8px); } }

/* ---- quick links */
.quick-links { margin-top: -2.5rem; position: relative; z-index: 5; }
.quick-card { background: #fff; border-radius: var(--bh-radius); box-shadow: var(--bh-shadow-lg); padding: 1.1rem; text-align: center; display: block; text-decoration: none; color: var(--bh-ink); transition: transform .25s ease, box-shadow .25s ease; height: 100%; }
.quick-card:hover { transform: translateY(-6px); color: var(--bh-red); }
.quick-card i { font-size: 1.8rem; display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; margin-bottom: .5rem; }
.qc-red i { background: var(--bh-red-soft); color: var(--bh-red); }
.qc-blue i { background: #e8f0fb; color: var(--bh-blue); }
.qc-green i { background: #e7f4ec; color: var(--bh-green); }
.qc-gold i { background: var(--bh-gold-soft); color: #b98900; }

/* ---- cards */
.card-x { border: 0; border-radius: var(--bh-radius); background: #fff; box-shadow: var(--bh-shadow); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; height: 100%; }
.card-x:hover { transform: translateY(-6px); box-shadow: var(--bh-shadow-lg); }
.card-x .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--bh-red), var(--bh-red-dark)); position: relative; }
.card-x .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-x:hover .thumb img { transform: scale(1.06); }
.card-x .thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(242, 183, 5, .7); font-size: 3rem; }
.card-x .card-body { padding: 1.15rem 1.25rem 1.35rem; }
.card-x .card-title { font-weight: 700; font-size: 1.08rem; line-height: 1.5; }
.card-x a.stretched-link { color: inherit; text-decoration: none; }
.card-x:hover .card-title { color: var(--bh-red); }
.date-badge { position: absolute; top: .75rem; left: .75rem; background: #fff; border-radius: .75rem; text-align: center; padding: .35rem .6rem; line-height: 1.1; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); z-index: 2; }
.date-badge .m { font-size: .7rem; color: var(--bh-red); font-weight: 700; display: block; }
.date-badge .d { font-size: 1.4rem; font-weight: 900; font-family: "Noto Serif TC", serif; }
.meta { color: var(--bh-muted); font-size: .85rem; }
.meta i { color: var(--bh-red); }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .7rem; border-radius: 999px; background: var(--bh-red-soft); color: var(--bh-red); font-size: .8rem; text-decoration: none; transition: .2s; border: 1px solid transparent; }
.chip:hover, .chip.active { background: var(--bh-red); color: #fff; }
.chip-blue { background: #e8f0fb; color: var(--bh-blue); } .chip-green { background: #e7f4ec; color: var(--bh-green); } .chip-gold { background: var(--bh-gold-soft); color: #8a6500; }

/* event list rows (home + mobile agenda) */
.event-row { display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: var(--bh-radius); padding: .9rem 1rem; box-shadow: var(--bh-shadow); text-decoration: none; color: var(--bh-ink); transition: .25s; border-left: 4px solid var(--bh-red); }
.event-row:hover { transform: translateX(4px); color: var(--bh-red); box-shadow: var(--bh-shadow-lg); }
.event-row .er-date { flex: 0 0 64px; text-align: center; border-radius: .75rem; background: var(--bh-red-soft); padding: .45rem 0; line-height: 1.1; }
.event-row .er-date .d { font-size: 1.6rem; font-weight: 900; color: var(--bh-red); font-family: "Noto Serif TC", serif; }
.event-row .er-date .m { font-size: .72rem; color: var(--bh-muted); }
.event-row.past { opacity: .65; border-left-color: #bbb; }
.bl-primary { border-left-color: var(--bh-blue) !important; } .bl-success { border-left-color: var(--bh-green) !important; } .bl-warning { border-left-color: var(--bh-gold) !important; } .bl-secondary { border-left-color: #999 !important; }

/* ---- calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.cal-nav h2 { margin: 0; font-size: 1.5rem; font-weight: 900; color: var(--bh-red-dark); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); border-radius: var(--bh-radius); overflow: hidden; box-shadow: var(--bh-shadow); background: #f3e9e7; gap: 1px; }
.calendar .wd { background: var(--bh-red); color: #fff; text-align: center; padding: .5rem 0; font-size: .85rem; font-weight: 700; }
.calendar .wd:first-child, .calendar .wd:last-child { background: var(--bh-red-dark); }
.calendar .day { background: #fff; min-height: 64px; padding: .3rem; font-size: .8rem; position: relative; cursor: default; transition: background .2s; }
.calendar .day.out { background: #fbf8f7; color: #c2b6b3; }
.calendar .day.today .num { background: var(--bh-red); color: #fff; }
.calendar .day.has { cursor: pointer; }
.calendar .day.has:hover { background: var(--bh-red-soft); }
.calendar .num { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; }
.calendar .ev { display: none; }
.calendar .dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 2px; }
.calendar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bh-red); }
.calendar .dot.primary { background: var(--bh-blue); } .calendar .dot.success { background: var(--bh-green); } .calendar .dot.warning { background: var(--bh-gold); } .calendar .dot.secondary { background: #999; }
.calendar .day.selected { outline: 2px solid var(--bh-red); outline-offset: -2px; z-index: 1; }
@media (min-width: 768px) {
  .calendar .day { min-height: 118px; padding: .45rem; }
  .calendar .dots { display: none; }
  .calendar .ev { display: block; font-size: .75rem; margin-top: 3px; padding: 2px 6px; border-radius: 6px; background: var(--bh-red-soft); color: var(--bh-red-dark); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: .2s; }
  .calendar .ev:hover { background: var(--bh-red); color: #fff; }
  .calendar .ev.primary { background: #e8f0fb; color: var(--bh-blue); } .calendar .ev.success { background: #e7f4ec; color: var(--bh-green); } .calendar .ev.warning { background: var(--bh-gold-soft); color: #8a6500; }
}
.day-panel { display: none; }
.day-panel.show { display: block; animation: revealUp .35s ease both; }

/* ---- article content */
.prose { font-size: 1.06rem; line-height: 1.95; }
.prose img { border-radius: .75rem; height: auto; margin: 1rem 0; }
.prose h2, .prose h3 { color: var(--bh-red-dark); margin-top: 2rem; font-weight: 700; }
.prose blockquote { border-left: 4px solid var(--bh-gold); background: var(--bh-gold-soft); padding: 1rem 1.25rem; border-radius: 0 .75rem .75rem 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.sticky-aside { position: sticky; top: 96px; }

/* ---- teachers */
.teacher-photo { aspect-ratio: 4 / 5; border-radius: 1.25rem; overflow: hidden; background: linear-gradient(160deg, var(--bh-gold), var(--bh-red)); position: relative; box-shadow: var(--bh-shadow-lg); }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-photo .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: rgba(255, 255, 255, .6); }

/* ---- shop */
.price { color: var(--bh-red); font-weight: 900; font-size: 1.15rem; }
.price del { color: #aaa; font-weight: 400; font-size: .85rem; margin-left: .35rem; }
.qty-group { display: inline-flex; align-items: center; border: 1px solid #e6d9d6; border-radius: 999px; overflow: hidden; background: #fff; }
.qty-group button { border: 0; background: transparent; width: 40px; height: 40px; font-size: 1.1rem; color: var(--bh-red); }
.qty-group button:active { background: var(--bh-red-soft); }
.qty-group input { width: 46px; text-align: center; border: 0; font-weight: 700; -moz-appearance: textfield; }
.qty-group input::-webkit-outer-spin-button, .qty-group input::-webkit-inner-spin-button { -webkit-appearance: none; }
.add-cart-btn.added { background: var(--bh-green) !important; border-color: var(--bh-green) !important; }
.fly-dot { position: fixed; width: 14px; height: 14px; border-radius: 50%; background: var(--bh-gold); z-index: 3000; pointer-events: none; transition: all .7s cubic-bezier(.5, -0.3, .7, 1); }
.summary-card { border-radius: var(--bh-radius); background: var(--bh-cream); padding: 1.25rem; border: 1px solid #f3e4dc; }
.pay-option { border: 2px solid #eee; border-radius: .9rem; padding: .85rem 1rem; transition: .2s; cursor: pointer; display: block; }
.pay-option:has(input:checked) { border-color: var(--bh-red); background: var(--bh-red-soft); }
.bank-box { background: linear-gradient(135deg, #fff, var(--bh-gold-soft)); border: 1px dashed var(--bh-gold); border-radius: var(--bh-radius); padding: 1.25rem; }
.copy-btn { cursor: pointer; }
.status-steps { display: flex; justify-content: space-between; position: relative; counter-reset: s; }
.status-steps::before { content: ""; position: absolute; top: 15px; left: 8%; right: 8%; height: 3px; background: #eee; }
.status-steps .st { position: relative; text-align: center; flex: 1; font-size: .78rem; color: #999; }
.status-steps .st span { display: flex; width: 32px; height: 32px; margin: 0 auto .35rem; border-radius: 50%; background: #eee; align-items: center; justify-content: center; font-weight: 700; position: relative; }
.status-steps .st.done { color: var(--bh-green); } .status-steps .st.done span { background: var(--bh-green); color: #fff; }
.status-steps .st.now { color: var(--bh-red); font-weight: 700; } .status-steps .st.now span { background: var(--bh-red); color: #fff; box-shadow: 0 0 0 6px rgba(185, 28, 28, .15); }

/* ---- forms / auth */
.form-card { background: #fff; border-radius: 1.25rem; box-shadow: var(--bh-shadow-lg); padding: 1.5rem; }
@media (min-width: 768px) { .form-card { padding: 2.25rem; } }
.form-card label { font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.form-card .helptext, .form-card .form-text { font-size: .8rem; color: var(--bh-muted); }
.form-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .form-card select, .form-card textarea, .allauth-wrap input:not([type=checkbox]):not([type=radio]):not([type=hidden]) {
  display: block; width: 100%; padding: .7rem .9rem; font-size: 1rem; border: 1px solid #e3d6d3; border-radius: .7rem; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus, .allauth-wrap input:focus { outline: 0; border-color: #e88; box-shadow: 0 0 0 .25rem rgba(185, 28, 28, .12); }
.errorlist { list-style: none; padding: 0; margin: .25rem 0 0; color: #b42318; font-size: .85rem; }
.required-mark { color: var(--bh-red); }
.social-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; padding: .7rem; border-radius: .7rem; font-weight: 700; text-decoration: none; border: 1px solid #e5e5e5; color: #333; background: #fff; transition: .2s; }
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .08); }
.social-btn.line { background: #06c755; color: #fff; border-color: #06c755; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: #aaa; font-size: .85rem; margin: 1.25rem 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: #eee; }
.allauth-wrap form p, .allauth-wrap form > div { margin-bottom: 1rem; }
.allauth-wrap button[type=submit], .allauth-wrap form button { background: var(--bh-red); color: #fff; border: 0; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 700; }
.member-perks li { display: flex; gap: .6rem; margin-bottom: .6rem; }
.member-perks i { color: var(--bh-gold); }

/* ---- CTA */
.join-cta { background: radial-gradient(circle at 10% 10%, rgba(242, 183, 5, .35), transparent 35%), radial-gradient(circle at 90% 90%, rgba(30, 90, 168, .35), transparent 40%), linear-gradient(135deg, var(--bh-red), var(--bh-red-dark)); color: #fff; position: relative; overflow: hidden; }
.join-cta::before { content: "☸"; position: absolute; left: -3rem; top: -3rem; font-size: 16rem; opacity: .06; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.join-cta h2 { font-weight: 900; font-size: clamp(1.6rem, 4.5vw, 2.6rem); }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 183, 5, .55); } 50% { box-shadow: 0 0 0 14px rgba(242, 183, 5, 0); } }

/* ---- footer */
.site-footer { background: #2a0d0d; color: #fff; }
.footer-title { color: var(--bh-gold); font-weight: 700; margin-bottom: 1rem; letter-spacing: .1em; }
.footer-links a, .footer-contact a, .footer-bottom a { color: rgba(255, 255, 255, .7); text-decoration: none; transition: .2s; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; padding-left: 4px; }
.footer-links li { margin-bottom: .45rem; }
.footer-contact li { display: flex; gap: .6rem; margin-bottom: .5rem; color: rgba(255, 255, 255, .75); }
.footer-contact i { color: var(--bh-gold); }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: .25s; }
.social a:hover { background: var(--bh-gold); color: var(--bh-red-dark); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }

/* ---- mobile tab bar */
.mobile-tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid #f0e4e1; display: flex; z-index: 1030; }
.mobile-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .7rem; color: var(--bh-muted); text-decoration: none; gap: 2px; }
.mobile-tabbar a i { font-size: 1.25rem; transition: transform .2s; }
.mobile-tabbar a:active i { transform: scale(.85); }
.mobile-tabbar .tab-cta i { width: 46px; height: 46px; margin-top: -22px; border-radius: 50%; background: var(--bh-red); color: var(--bh-gold); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(185, 28, 28, .4); border: 3px solid #fff; }
.mobile-tabbar .tab-cta span { color: var(--bh-red); font-weight: 700; }
.back-to-top { position: fixed; right: 1rem; bottom: calc(var(--tabbar-h) + 1rem); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bh-red); color: #fff; box-shadow: var(--bh-shadow-lg); opacity: 0; transform: translateY(20px); transition: .3s; z-index: 1020; pointer-events: none; }
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 992px) { .back-to-top { bottom: 1.5rem; } }

/* ---- scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .1s; } .reveal.delay-2 { transition-delay: .2s; } .reveal.delay-3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
.pagination { --bs-pagination-color: var(--bh-red); --bs-pagination-active-bg: var(--bh-red); --bs-pagination-active-border-color: var(--bh-red); --bs-pagination-border-radius: 999px; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--bh-muted); }
.empty-state i { font-size: 3rem; color: #e5c9c4; }

/* allauth pages: center the content as a card */
.allauth-page main { max-width: 560px; margin: 2rem auto 3rem; background: #fff; border-radius: 1.25rem; box-shadow: var(--bh-shadow-lg); padding: 1.75rem 1.5rem; }
@media (max-width: 600px) { .allauth-page main { margin: 1rem .75rem 2rem; } }
.allauth-page main h1 { font-size: 1.6rem; font-weight: 900; color: var(--bh-red-dark); margin-bottom: 1rem; }
.allauth-page main input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { display: block; width: 100%; padding: .7rem .9rem; font-size: 1rem; border: 1px solid #e3d6d3; border-radius: .7rem; margin: .25rem 0 .75rem; }
.allauth-page main form button[type=submit], .allauth-page main .btn-main { background: var(--bh-red); color: #fff; border: 0; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 700; }
.allauth-page main.custom { max-width: 980px; padding: 0; background: transparent; box-shadow: none; }
.hero .carousel-indicators { bottom: 3rem; }
@media (max-width: 767.98px) { .hero .slide-content { padding-bottom: 6.5rem; } .hero .carousel-indicators { bottom: 2.75rem; } }
.mobile-reg-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); z-index: 1025; box-shadow: 0 10px 24px rgba(185, 28, 28, .35); transition: opacity .25s, transform .25s; }
.mobile-reg-cta.hide { opacity: 0; pointer-events: none; transform: translate(-50%, 20px); }

/* =====================================================================
   KTR additions (ktr.guru) — multilingual fonts, 4:5 post frames, galleries
   ===================================================================== */
:root { --bs-body-font-family: "Noto Sans", "Noto Sans TC", "Noto Serif Tibetan", system-ui, -apple-system, "Segoe UI", sans-serif; }
.font-serif, h1, h2, h3, .display-title, .card-title { font-family: "Noto Serif", "Noto Serif TC", "Noto Serif Tibetan", Georgia, serif; }
.lang-zh-hant { --bs-body-font-family: "Noto Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
.lang-zh-hant h1, .lang-zh-hant h2, .lang-zh-hant h3, .lang-zh-hant .font-serif { font-family: "Noto Serif", "Noto Serif TC", serif; }
.lang-ja { --bs-body-font-family: "Noto Sans", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }
.lang-ja h1, .lang-ja h2, .lang-ja h3, .lang-ja .font-serif { font-family: "Noto Serif", "Noto Serif JP", serif; }
.lang-ko { --bs-body-font-family: "Noto Sans", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
.lang-ko h1, .lang-ko h2, .lang-ko h3, .lang-ko .font-serif { font-family: "Noto Serif", "Noto Serif KR", serif; }
body { letter-spacing: .01em; }
.brand-name { font-family: "Noto Serif", serif; letter-spacing: .08em; }
.brand-logo { border-radius: 50%; }
.brand-logo-footer { border-radius: 50%; }
.brand-en { letter-spacing: .06em; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
@media (max-width: 400px) { .brand-en { display: none; } }
.btn-lang { border: 1px solid #ead9d5; background: #fff; color: var(--bh-ink); font-size: .8rem; padding: .3rem .7rem; }
.btn-lang:hover, .btn-lang[aria-expanded=true] { border-color: var(--bh-red); color: var(--bh-red); }
.lang-dropdown .dropdown-item.active, .lang-dropdown .dropdown-item:active { background: var(--bh-red); }
@media (max-width: 575.98px) { .btn-lang span { display: none; } }
.hero-title { font-size: clamp(2.2rem, 8vw, 4.8rem); font-weight: 900; color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.45); letter-spacing: .06em; }
.chip-scroller { scrollbar-width: none; } .chip-scroller::-webkit-scrollbar { display: none; }
.search-form { min-width: 260px; }

/* 1080×1350 (4:5) frame for post list cards and post detail.
   New posts: a 1080×1350 image fills it exactly. Legacy WordPress images: 100% width,
   height by ratio, the rest letterboxed in black — never cropped. */
.frame-45 { position: relative; aspect-ratio: 1080 / 1350; background: #000; overflow: hidden; }
.frame-45 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform .6s ease; }
.frame-45 .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(242, 183, 5, .7); font-size: 3rem; background: linear-gradient(135deg, var(--bh-red), var(--bh-red-dark)); }
.post-card:hover .frame-45 img { transform: scale(1.03); }
.post-card .card-body { padding: .85rem 1rem 1rem; }
.post-card .card-title { font-size: .98rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 575.98px) { .post-card .card-title { font-size: .88rem; } .post-card .chip { font-size: .7rem; padding: .15rem .5rem; } }
.sticky-aside { position: sticky; top: 96px; }
@media (max-width: 991.98px) { .sticky-aside { position: static; } }

/* Imported WordPress content */
.prose { line-height: 1.85; font-size: 1.04rem; overflow-wrap: anywhere; }
.prose img { height: auto; border-radius: .5rem; }
.prose figure { margin: 1.25rem 0; }
.prose figcaption { font-size: .85rem; color: var(--bh-muted); margin-top: .35rem; }
.prose blockquote { border-left: 4px solid var(--bh-gold); padding: .5rem 1rem; background: var(--bh-cream); border-radius: .5rem; }
.prose iframe { max-width: 100%; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; color: var(--bh-red-dark); }
.prose h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.wp-gallery { display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr); margin: 1.25rem 0; }
@media (min-width: 768px) { .wp-gallery.cols-3, .wp-gallery.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .wp-gallery.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.wp-gallery.cols-1 { grid-template-columns: 1fr; }
.wp-gallery figure { margin: 0; aspect-ratio: 1; background: #111; border-radius: .5rem; overflow: hidden; }
.wp-gallery figure a { display: block; width: 100%; height: 100%; }
.wp-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .4s ease; }
.wp-gallery a:hover img { transform: scale(1.05); }
.embed-video { margin: 1.25rem 0; border-radius: .75rem; overflow: hidden; background: #000; }
.prose .instagram-media { margin: 1.25rem auto !important; max-width: 540px; }
.feature-card { background: #fff; border-radius: var(--bh-radius); box-shadow: var(--bh-shadow); overflow: hidden; color: var(--bh-ink); transition: transform .3s ease, box-shadow .3s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--bh-shadow-lg); color: var(--bh-ink); }
.feature-img { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
.social-dark a { background: var(--bh-red-soft); color: var(--bh-red); }
.teacher-photo { aspect-ratio: 4 / 5; }
