:root {
    --ink: #2c2926;
    --soft-ink: #545650;
    --muted: #81837c;
    --paper: #faf7f2;
    --cream: #f4efe6;
    --sand: #e8dfce;
    --gold: #c59b27;
    --red: #7a2523;
    --red-dark: #4a1816;
    --line: #e6e0d4;
    --site-width: 1200px;
    --border-radius: 4px;
    --font-base: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    font-size: var(--font-base, 14px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Announcement Bar */
.portal-announcement-bar {
    background: var(--red-dark);
    color: #f7eedc;
    font-size: 12px;
    padding: 6px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(197, 155, 39, 0.35);
}
.portal-announcement-bar .announcement-inner {
    max-width: var(--site-width, 1200px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.portal-announcement-bar a {
    color: #ffd875;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}
.portal-announcement-bar a:hover { color: #fff; }

/* Header & Masthead - Compact, Dignified */
.portal-header {
    position: relative;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.masthead {
    width: min(var(--site-width, 1200px), calc(100% - 32px));
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
    padding: 8px 0;
}
.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--red);
    font: 600 18px/1.15 "Literata", Georgia, serif;
    text-decoration: none;
    flex-shrink: 0;
}
.portal-brand img,
.site-logo-img {
    height: 44px !important;
    max-height: 44px !important;
    max-width: 140px !important;
    width: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}
.footer-brand img {
    height: 34px !important;
    max-height: 34px !important;
    max-width: 120px !important;
    width: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
    vertical-align: middle !important;
}
.brand-seal {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font: 22px "Literata", Georgia, serif;
    background: var(--cream);
    flex-shrink: 0;
}
.portal-brand small {
    display: block;
    margin-top: 2px;
    color: #77776f;
    font: 600 9px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-search {
    width: 170px;
    height: 32px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--border-radius, 4px);
    background: #faf8f5;
    padding: 0 6px 0 10px;
    transition: border-color .15s, width .2s;
}
.site-search:focus-within {
    border-color: var(--gold);
    background: #fff;
    width: 200px;
}
.site-search input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    font-size: 12px;
    background: transparent;
    color: var(--ink);
}
.site-search button {
    padding: 2px 4px;
    border: 0;
    color: var(--red);
    background: transparent;
    font-size: 15px;
    cursor: pointer;
}
.language-switch { position: relative; }
.language-switch summary {
    max-width: 130px;
    overflow: hidden;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius, 3px);
    color: var(--soft-ink);
    background: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.language-options {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    width: max-content;
    min-width: 140px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius, 4px);
    background: #fff;
    box-shadow: 0 8px 24px rgba(20,20,20,.12);
}
.language-options a {
    display: block;
    padding: 6px 10px;
    color: var(--soft-ink);
    font-size: 12px;
    border-radius: 2px;
}
.language-options a:hover, .language-options a[aria-current="page"] {
    color: var(--red);
    background: var(--cream);
}
.header-cart {
    position: relative;
    color: var(--red);
    font-size: 18px;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
}
.header-cart span {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--red);
    font-size: 9px;
    font-weight: 700;
}
.header-account-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-login-link, .header-register-link {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--red);
    border-radius: var(--border-radius, 3px);
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: all .15s;
}
.header-register-link { color: #fff; background: var(--red); }
.header-login-link:hover { color: #fff; background: var(--red); }
.header-register-link:hover { background: var(--red-dark); border-color: var(--red-dark); }
.portal-member-name {
    max-width: 120px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: var(--red);
}

.nav-toggle-checkbox { position: absolute; display: none; }
.nav-toggle { display: none; }

/* Navigation Bar - Dignified, Accessible, No Cutoff */
.portal-nav {
    min-height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 10px;
    padding: 6px 16px;
    background: #faf8f5;
    border-top: 1px solid #f0ebe2;
    border-bottom: 1px solid var(--line);
    width: 100%;
}
@media (max-width: 1100px) {
    .portal-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 12px;
        scrollbar-width: thin;
    }
}
.portal-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    color: #4a4742;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--border-radius, 3px);
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.portal-nav a:hover {
    color: var(--red);
    background: rgba(197, 155, 39, 0.1);
}
.portal-nav a.active {
    color: var(--red);
    background: rgba(122, 37, 35, 0.08);
    font-weight: 700;
}
.portal-nav .member-auth-link { padding: 4px 8px; color: var(--red); }
.portal-nav .member-logout { display: inline-flex; align-items: center; margin: 0; }
.portal-nav .member-logout button { padding: 4px 8px; border: 0; background: transparent; color: var(--red); font-size: 12px; font-weight: 600; cursor: pointer; }

.translation-note { padding: 6px 16px; color: #7e786e; background: #f8f6f1; font-size: 11px; text-align: center; }
.portal-notice {
    width: min(var(--site-width, 1200px), calc(100% - 32px));
    margin: 12px auto;
    padding: 8px 14px;
    border-left: 3px solid var(--gold);
    border-radius: var(--border-radius, 3px);
    color: var(--red-dark);
    background: var(--cream);
    font-size: 13px;
}
.portal-notice p { margin: 2px 0; }

/* Member Auth Pages */
.member-auth-section { min-height: 50vh; display: grid; place-items: center; padding: 40px 20px 56px; background: linear-gradient(180deg, #f8f6f1, var(--paper)); }
.member-auth-card { width: min(100%, 460px); padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: var(--border-radius, 4px); background: #fff; box-shadow: 0 12px 36px rgba(40,35,27,.05); }
.account-card { width: min(100%, 560px); }
.account-section-title { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--red); font: 600 20px/1.3 "Literata", Georgia, serif; }
.member-auth-card h1 { margin: 8px 0 6px; color: var(--red); font: 600 clamp(26px, 4vw, 34px)/1.2 "Literata", Georgia, serif; }
.member-auth-card > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.member-auth-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.member-auth-form { display: grid; gap: 8px; margin-top: 16px; }
.member-auth-form > label { margin-top: 4px; color: var(--soft-ink); font-size: 12px; font-weight: 600; }
.member-auth-form > input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--border-radius, 3px); color: var(--ink); background: #fff; font-size: 13px; }
.member-auth-form > input:focus { border-color: var(--gold); outline: 2px solid rgba(197,155,39,.18); }
.member-auth-form .portal-button { width: 100%; margin-top: 8px; font-size: 13px; min-height: 38px; }
.member-auth-remember { display: flex; align-items: center; gap: 8px; color: var(--soft-ink); font-size: 12px; }
.member-auth-remember input { accent-color: var(--red); }
.member-auth-error { color: #a12f2a; font-size: 12px; }
.member-auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.member-auth-links a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Hero Section - Compact & Proportional */
.portal-hero {
    position: relative;
    width: min(var(--site-width, 1200px), calc(100% - 32px));
    min-height: 320px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 28px;
    margin: 0 auto;
    padding: 24px 0 28px;
}
.hero-copy { position: relative; z-index: 1; }
.kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; }
.kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; }
.hero-copy h1, .listing-intro h1 { max-width: 560px; margin: 10px 0 10px; color: var(--red); font: 600 clamp(26px, 3.2vw, 38px)/1.18 "Literata", Georgia, serif; letter-spacing: -.03em; }
.hero-copy > p { max-width: 490px; margin: 0; color: var(--soft-ink); font-size: 13px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.portal-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--red);
    border-radius: var(--border-radius, 4px);
    color: white;
    background: var(--red);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.portal-button:hover { color: white; background: var(--red-dark); border-color: var(--red-dark); }
.portal-button:disabled { opacity: .5; cursor: not-allowed; }
.portal-button span { font-size: 13px; }
.quiet-link { color: var(--red); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-meta { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: #99978e; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.hero-meta span:first-child { color: var(--red); font-weight: 700; }
.hero-meta i { width: 28px; height: 1px; background: #c9c4b8; display: inline-block; }
.hero-art { position: relative; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.hero-art-frame { width: 100%; height: 280px; overflow: hidden; background: var(--sand); border-radius: var(--border-radius, 6px); border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(0,0,0,0.05); }
.hero-art-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption { position: absolute; right: 10px; bottom: 12px; display: flex; align-items: center; gap: 10px; min-width: 170px; padding: 8px 12px; border: 1px solid #efede7; border-radius: var(--border-radius, 4px); background: white; box-shadow: 0 4px 15px rgba(40,35,27,.06); }
.hero-caption > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--gold); background: var(--cream); font-size: 16px; flex-shrink: 0; }
.hero-caption strong, .hero-caption small { display: block; }
.hero-caption strong { font: 600 12px "Literata", Georgia, serif; color: var(--ink); }
.hero-caption small { margin-top: 2px; color: var(--muted); font-size: 10px; }

/* Sections & Typography - Compact Spacing */
.portal-section {
    width: min(var(--site-width, 1200px), calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 8px;
}
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2, .media-band h2 { margin: 4px 0 3px; color: var(--red); font: 600 clamp(20px, 2.4vw, 26px)/1.25 "Literata", Georgia, serif; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--soft-ink); font-size: 13px; }
.section-link, .text-link-light { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 12px; font-weight: 600; text-decoration: none; }
.section-link:hover { color: var(--red-dark); }
.section-link span, .text-link-light span { font-size: 13px; }

/* Topic Grid & Cards */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.topic-card { position: relative; min-height: 140px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--border-radius, 4px); background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.topic-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.04); }
.topic-index { color: #aaa59b; font-size: 11px; letter-spacing: .08em; }
.topic-symbol { position: absolute; top: 14px; right: 16px; color: var(--gold); font: 24px "Literata", Georgia, serif; }
.topic-card h3 { margin: 18px 0 6px; color: var(--red); font: 600 16px "Literata", Georgia, serif; }
.topic-card p { margin: 0 0 12px; color: var(--soft-ink); font-size: 12px; line-height: 1.55; flex: 1; }
.topic-arrow { font-size: 12px; color: var(--red); font-weight: 600; margin-top: auto; }

/* Media Band */
.media-band { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 36px; padding: 32px max(20px, calc((100% - var(--site-width, 1200px))/2)); color: #f9f6f0; background: var(--red-dark); border-radius: var(--border-radius, 4px); }
.media-band .kicker { color: #f0d5a6; }
.media-band h2 { max-width: 420px; margin: 8px 0; color: #fffaf1; }
.media-band-copy > p { color: #d3c7b9; font-size: 13px; line-height: 1.65; }
.text-link-light { margin-top: 10px; color: #f0d5a6; }
.media-categories { display: flex; flex-direction: column; justify-content: center; }
.media-categories a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.15); color: #f7f1e8; font: 400 14px "Literata", Georgia, serif; }
.media-categories a:hover { color: #ffd875; }
.media-categories a b { color: #f0d5a6; font: 400 13px sans-serif; }
.media-categories p { color: #d3c7b9; font-size: 12px; margin: 0; }

/* Books Section */
.books-section { padding-top: 28px; }
.book-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--border-radius, 4px); overflow: hidden; background: #fff; }
.book-topic { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-right: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .15s; }
.book-topic:last-child { border-right: 0; }
.book-topic:hover { background: var(--cream); }
.book-topic-mark { color: var(--gold); font-size: 18px; flex-shrink: 0; }
.book-topic strong, .book-topic small { display: block; }
.book-topic strong { color: var(--red); font: 600 13px "Literata", Georgia, serif; }
.book-topic small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.book-topic .topic-arrow { margin-left: auto; color: var(--gold); }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.book-card { border: 1px solid var(--line); border-radius: var(--border-radius, 4px); background: #fff; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .15s, transform .15s; }
.book-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.04); }
.book-cover { position: relative; display: block; overflow: hidden; aspect-ratio: .78; background: var(--cream); border-radius: 2px; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.book-card:hover .book-cover img { transform: scale(1.025); }
.book-cover > span { position: absolute; top: 8px; left: 8px; padding: 3px 6px; color: white; background: var(--red); font-size: 10px; font-weight: 700; border-radius: 2px; }
.book-info { padding-top: 8px; }
.book-category { color: var(--gold); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.book-info h3 { margin: 4px 0 2px; font: 600 14px/1.35 "Literata", Georgia, serif; color: var(--red); }
.book-info > strong { color: var(--red); font-size: 13px; font-weight: 700; }
.author-subtext { font-size: 12px; color: var(--soft-ink); margin: 2px 0 6px; }
.book-pricing-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid #f0ebe2; }
.book-price { margin: 0; color: var(--red); font: 700 14px "Literata", Georgia, serif; }
.quick-read-link, .quick-buy-link { font-size: 12px; font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.free-label { font-size: 11px; font-weight: 700; color: #28643d; background: #e7f2e9; padding: 2px 6px; border-radius: 2px; }

.editorial-empty { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--border-radius, 4px); color: #85847d; text-align: center; }
.editorial-empty > span { color: var(--gold); font-size: 22px; }
.editorial-empty p { margin: 6px 0 0; font-size: 13px; }
.editorial-empty small { max-width: 590px; margin-top: 4px; color: #99968e; font-size: 11px; line-height: 1.5; }

/* Recent Section */
.recent-section { padding-top: 28px; padding-bottom: 32px; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.entry-card { border: 1px solid var(--line); border-radius: var(--border-radius, 4px); background: #fff; overflow: hidden; transition: border-color .15s, transform .15s; }
.entry-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.entry-image { position: relative; display: block; height: 170px; overflow: hidden; background: var(--cream); }
.entry-image img { width: 100%; height: 100%; object-fit: cover; }
.entry-image > span { position: absolute; bottom: 8px; left: 8px; padding: 3px 6px; color: var(--red); background: #fff; font-size: 10px; font-weight: 600; border-radius: 2px; }
.entry-body { padding: 14px; }
.entry-body time { color: #9a958a; font-size: 11px; }
.entry-body h3 { margin: 6px 0; color: var(--red); font: 600 16px/1.35 "Literata", Georgia, serif; }
.entry-body p { color: var(--soft-ink); font-size: 12px; line-height: 1.55; margin: 0 0 10px; }

/* Listing Layout */
.listing-intro { padding: 32px max(20px, calc((100% - var(--site-width, 1200px))/2)) 24px; background: var(--cream); border-bottom: 1px solid var(--line); }
.listing-intro h1 { margin: 8px 0 6px; font-size: clamp(26px, 3.2vw, 36px); }
.listing-intro > p { max-width: 690px; margin: 0; color: #73736c; font-size: 13px; line-height: 1.65; }
.source-guidance { display: block; margin-top: 10px; color: #969188; font-size: 11px; }
.listing-layout, .catalog-layout { width: min(var(--site-width, 1200px), calc(100% - 32px)); display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 28px; margin: 0 auto; padding: 28px 0 48px; }
.topic-sidebar { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.topic-sidebar h2 { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--red); font: 600 16px "Literata", Georgia, serif; }
.topic-sidebar a { display: flex; justify-content: space-between; padding: 8px 8px; color: #6f7069; font-size: 12px; border-radius: var(--border-radius, 3px); }
.topic-sidebar a:hover, .topic-sidebar a.selected { color: var(--red); background: #f8f5ef; font-weight: 600; }
.topic-sidebar small { color: #a29d91; }
.listing-content { min-width: 0; }
.category-description { margin-bottom: 16px; }
.category-description h2 { margin: 0 0 4px; color: var(--red); font: 600 18px "Literata", Georgia, serif; }
.category-description p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.article-breadcrumb { width: min(var(--site-width, 1200px), calc(100% - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 auto; padding: 14px 0; color: #88877f; font-size: 12px; }
.article-breadcrumb a:hover { color: var(--red); }
.article-page { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 60px; }
.article-heading { padding: 18px 0 20px; text-align: center; }
.article-heading h1 { margin: 10px 0; color: var(--red); font: 600 clamp(26px, 3.8vw, 40px)/1.2 "Literata", Georgia, serif; letter-spacing: -.03em; }
.article-heading p { color: #77766f; font-size: 13px; line-height: 1.7; }
.article-heading time { color: #9b978f; font-size: 11px; }
.article-cover { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--border-radius, 4px); }
.article-body { padding: 24px 0; color: #3a3a35; font: 400 15px/1.85 "Literata", Georgia, serif; }

.book-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.book-filters input, .book-filters select { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--border-radius, 3px); color: var(--soft-ink); background: #fff; font-size: 12px; }
.book-filters input { flex: 1; }
.book-filters select { width: 150px; }
.book-filters .portal-button { min-height: 36px; }
.result-count { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.catalog-layout .book-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.book-detail { width: min(1080px, calc(100% - 32px)); display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 60px); margin: 0 auto; padding: 12px 0 60px; }
.book-detail-cover { height: min(520px, 60vw); min-height: 300px; overflow: hidden; background: var(--cream); border-radius: var(--border-radius, 4px); border: 1px solid var(--line); }
.book-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-detail-copy { align-self: center; }
.book-detail-copy h1 { margin: 8px 0 6px; color: var(--red); font: 600 clamp(26px, 3.2vw, 38px)/1.2 "Literata", Georgia, serif; }
.book-detail-code { color: #98958c; font-size: 11px; }
.book-detail-price { display: block; margin-top: 14px; color: var(--red); font: 700 22px "Literata", Georgia, serif; }
.book-detail-description { margin-top: 12px; color: #60605a; font-size: 13px; line-height: 1.75; }
.book-stock { color: #28643d; font-size: 12px; font-weight: 600; }
.book-purchase { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.book-purchase label { display: flex; align-items: center; gap: 6px; color: #74746d; font-size: 12px; }
.book-purchase input { width: 55px; height: 38px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--border-radius, 3px); text-align: center; }

/* Footer - Compact & Elegant */
.portal-footer {
    margin-top: 36px;
    padding: 32px max(16px, calc((100% - var(--site-width, 1200px)) / 2)) 0;
    color: #eee8df;
    background: var(--red-dark);
}
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-bottom: 24px; }
.footer-brand { color: #fff; font: 600 18px "Literata", Georgia, serif; }
.footer-brand .brand-seal { color: var(--gold); border-color: var(--gold); background: rgba(255,255,255,0.06); }
.footer-identity > p, .source-note > p { max-width: 320px; color: #d1c7bc; font-size: 13px; line-height: 1.65; margin: 8px 0 0; }
.footer-main h2 { margin: 0 0 10px; color: #f7eedc; font: 600 14px "Literata", Georgia, serif; letter-spacing: .02em; }
.footer-main > div:not(.footer-identity) { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-main > div > a:not(.portal-brand), .source-note > span { color: #c7bdb0; font-size: 12px; text-decoration: none; transition: color .15s; }
.footer-main a:hover { color: #ffd875 !important; }
.source-note > span { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.source-note > a { color: #ffd875 !important; font-size: 12px; }
.footer-bottom { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255,255,255,0.12); color: #b5aaa0; font-size: 11px; }

/* Responsive Media Queries */
@media (max-width: 900px) {
    .masthead { width: calc(100% - 24px); }
    .portal-nav { gap: 4px 8px; }
    .portal-hero, .portal-section, .listing-layout, .catalog-layout, .book-detail, .article-breadcrumb { width: calc(100% - 24px); }
    .portal-hero { gap: 20px; grid-template-columns: 1fr; }
    .hero-art-frame { height: 260px; }
    .hero-art { min-height: 260px; }
    .listing-layout, .catalog-layout { grid-template-columns: 180px minmax(0,1fr); gap: 20px; }
    .footer-main { grid-template-columns: 1.2fr 1fr 1fr; }
    .source-note { grid-column: 1/-1; }
}

@media (max-width: 650px) {
    .masthead { position: relative; width: calc(100% - 20px); min-height: 56px; display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
    .portal-brand { font-size: 16px; gap: 8px; }
    .brand-seal { width: 32px; height: 32px; font-size: 18px; }
    .header-tools { gap: 8px; }
    .site-search { width: 32px; border: 0; background: transparent; padding: 0; }
    .site-search input { position: absolute; top: 56px; right: 0; left: 0; width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: white; opacity: 0; pointer-events: none; z-index: 15; }
    .site-search:focus-within input { opacity: 1; pointer-events: auto; }
    .site-search button { font-size: 18px; }
    .nav-toggle-checkbox { display: block; }
    .nav-toggle { display: grid; place-items: center; width: 32px; height: 32px; color: var(--red); font-size: 20px; cursor: pointer; border: 1px solid var(--line); border-radius: 3px; }
    .portal-nav { position: absolute; top: 56px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 12px 24px rgba(20,20,20,.1); z-index: 25; }
    .nav-toggle-checkbox:checked ~ .portal-nav { display: flex; }
    .portal-nav a { padding: 10px 0; border-bottom: 1px solid #f1efea; font-size: 12px; }
    .portal-hero { grid-template-columns: 1fr; gap: 16px; padding: 20px 0; }
    .hero-copy h1 { font-size: clamp(24px, 7vw, 32px); }
    .portal-section { padding-top: 24px; }
    .book-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .listing-layout, .catalog-layout { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Tibetan Typography & Karmapa International Dharma Center Enhancements
   ========================================================================== */

:lang(bo), .tibetan-text, .tibetan-badge, .tibetan-title-sm,
.reader-tibetan-title, .book-tibetan-heading, .card-tibetan-title,
.book-tibetan-title, .cover-tibetan, .video-tibetan-text, .bm-tibetan {
    font-family: "Noto Sans Tibetan", "Jomolhari", "Sambhota Unicode", "Monlam Uni", "Literata", serif;
    line-height: 1.65;
    letter-spacing: .02em;
}

.secondary-btn {
    background: transparent !important;
    border: 1px solid var(--red) !important;
    color: var(--red-dark) !important;
}
.secondary-btn:hover {
    background: var(--red) !important;
    color: #fff !important;
}

/* Lineage Masters Section */
.lineage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.lineage-card {
    padding: 22px;
    border: 1px solid var(--line);
    background: #fff;
    border-top: 3px solid var(--gold);
    display: flex;
    flex-direction: column;
}
.lineage-card:hover {
    box-shadow: 0 8px 24px rgba(40,20,10,.07);
    border-color: var(--gold);
}
.tibetan-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--red);
    background: var(--cream);
    font-weight: 600;
}
.phonetic-badge {
    display: block;
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}
.lineage-card h3 {
    margin: 4px 0 6px;
    font: 500 18px/1.3 "Literata", Georgia, serif;
    color: var(--red-dark);
}
.teacher-subtitle {
    color: var(--gold);
    font-size: 11px;
    margin-bottom: 8px;
}
.lineage-card .excerpt {
    font-size: 11px;
    line-height: 1.65;
    color: var(--soft-ink);
    flex-grow: 1;
}

/* Free Reading Showcase Section */
.reader-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.reader-card {
    padding: 24px;
    border: 1px solid var(--line);
    background: #fff;
    border-left: 4px solid var(--red);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.reader-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.free-pill {
    display: inline-block;
    padding: 3px 9px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: var(--red);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.page-pill {
    font-size: 10px;
    color: var(--muted);
}
.tibetan-title-sm {
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 4px;
}
.reader-card h3 {
    margin: 4px 0 8px;
    font: 500 20px/1.3 "Literata", Georgia, serif;
    color: var(--red-dark);
}
.book-author {
    font-size: 11px;
    color: var(--soft-ink);
    margin-bottom: 8px;
}
.book-excerpt {
    font-size: 11px;
    line-height: 1.65;
    color: var(--soft-ink);
    flex-grow: 1;
}
.reader-card-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.read-now-btn {
    font-size: 10px;
    padding: 8px 14px;
}

/* Dharma Videos Section */
.video-section-band {
    background: #23201e;
    color: #fbf9f4;
    padding: 52px 0;
    margin-top: 48px;
}
.video-section-band .section-heading h2 { color: #fff; }
.video-section-band .section-heading p { color: #c4c0b8; }
.video-section-band .kicker { color: var(--gold); }
.section-link.light { color: var(--gold); border-color: var(--gold); }
.section-link.light:hover { background: var(--gold); color: #23201e; }
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
    width: min(1200px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}
.video-card {
    background: #2c2825;
    border: 1px solid #3d3834;
    overflow: hidden;
}
.video-card:hover {
    border-color: var(--gold);
}
.video-thumb-frame {
    position: relative;
    aspect-ratio: 16/9;
    background: #1a1715;
    overflow: hidden;
}
.video-thumb-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(122,27,40,.9);
    color: #fff;
    font-size: 15px;
}
.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,.8);
}
.video-card a {
    display: block;
    padding: 14px;
    color: #fff;
}
.video-tibetan-text {
    display: block;
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 4px;
}
.video-card h3 {
    margin: 4px 0 6px;
    font: 500 15px/1.3 "Literata", Georgia, serif;
    color: #fff;
}
.video-speaker {
    font-size: 10px;
    color: #b8b3a8;
}

/* Catalog Filter Tabs */
.catalog-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 24px;
}
.tab-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--soft-ink);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.tab-pill:hover, .tab-pill.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* Book Details Enhancements */
.book-tibetan-heading {
    font-size: 20px;
    color: var(--red);
    margin-top: 6px;
}
.book-phonetic-sub {
    font-size: 11px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 6px;
}
.book-metadata-list {
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 6px;
    font-size: 11px;
}
.free-book-banner {
    padding: 14px 18px;
    background: var(--cream);
    border-left: 3px solid var(--gold);
    margin: 18px 0;
}
.free-book-banner p { margin: 4px 0 0; font-size: 11px; color: var(--soft-ink); }
.badge-free { font-size: 11px; font-weight: 700; color: var(--red-dark); }
.book-actions-group { margin: 20px 0; display: flex; flex-direction: column; gap: 14px; }
.reader-cta-btn { font-size: 12px; padding: 12px 24px; }
.card-free-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 7px;
    background: var(--red);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}
.card-tibetan-title, .book-tibetan-title {
    font-size: 13px;
    color: var(--red);
    display: block;
    margin: 6px 0 2px;
}
.free-text-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--gold);
}
.read-card-btn {
    font-size: 9px;
    padding: 6px 10px;
}
.book-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}
.quick-cart-form button { font-size: 9px; padding: 6px 10px; }

/* Article & Video details */
.article-tibetan-title {
    font-size: 22px;
    color: var(--red);
    margin-top: 6px;
}
.article-phonetic-title {
    font-size: 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    margin: 12px 0 16px;
}
.article-video-container { margin: 24px 0; }
.responsive-video-aspect {
    position: relative;
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 900px;
    background: #000;
    overflow: hidden;
}
.responsive-video-aspect iframe, .responsive-video-aspect video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.article-source-box {
    margin: 24px 0;
    padding: 12px 18px;
    background: var(--cream);
    border-left: 2px solid var(--gold);
    font-size: 10px;
}
.article-source-box a { color: var(--red); font-weight: 700; }

/* Online Dharma Reader */
.dharma-reader-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.dharma-reader-wrapper.theme-cream { background: #fbf8f2; color: #2a2723; }
.dharma-reader-wrapper.theme-paper { background: #ffffff; color: #1e1d1b; }
.dharma-reader-wrapper.theme-night { background: #1c1a18; color: #d6d0c4; }

.reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 28px;
    border-bottom: 1px solid rgba(120,100,70,.15);
    background: inherit;
}
.theme-night .reader-toolbar { border-bottom-color: rgba(255,255,255,.12); }
.reader-back-link { font-size: 11px; font-weight: 700; color: inherit; }
.reader-badge { font: 600 12px "Literata", Georgia, serif; color: var(--gold); }
.reader-setting-group {
    display: inline-flex;
    gap: 4px;
    padding: 2px;
    border: 1px solid rgba(120,100,70,.2);
}
.theme-pill, .size-pill {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    color: inherit;
}
.theme-pill.active, .size-pill.active {
    background: var(--red);
    color: #fff;
}
.reader-container {
    width: min(840px, calc(100% - 40px));
    margin: 36px auto 72px;
}
.reader-frontmatter {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(120,100,70,.15);
}
.reader-tibetan-title {
    font-size: 26px;
    color: var(--red);
    margin-bottom: 6px;
}
.reader-phonetic-title {
    font-size: 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 10px;
}
.reader-book-title {
    font: 500 clamp(26px, 5vw, 36px)/1.25 "Literata", Georgia, serif;
    margin: 0 0 14px;
}
.reader-meta-row {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.reader-text-body {
    font-family: "Literata", Georgia, serif;
    line-height: 1.85;
    margin: 30px 0;
}
.size-sm .reader-text-body { font-size: 16px; }
.size-md .reader-text-body { font-size: 18px; }
.size-lg .reader-text-body { font-size: 21px; }

.reader-text-body h2 {
    font-size: 1.5em;
    color: var(--red);
    margin: 2em 0 .8em;
    text-align: center;
    border-bottom: 1px solid rgba(120,100,70,.15);
    padding-bottom: .4em;
}
.reader-text-body h3 {
    font-size: 1.25em;
    color: var(--gold);
    margin: 1.6em 0 .6em;
}
.reader-text-body h4 { font-size: 1.1em; margin: 1.2em 0 .4em; }
.reader-text-body blockquote {
    margin: 1.5em 0;
    padding: 14px 24px;
    border-left: 3px solid var(--gold);
    font-style: italic;
    background: rgba(197,155,39,.07);
}
.reader-divider {
    border: 0;
    height: 1px;
    background: rgba(120,100,70,.2);
    margin: 2.5em 0;
}
.bookmark-card {
    padding: 24px;
    border: 1px solid rgba(120,100,70,.2);
    background: rgba(120,100,70,.04);
    margin-top: 48px;
}
.bookmark-card h3 { margin: 0 0 12px; font-size: 15px; color: var(--red); }
.bookmark-form { display: grid; gap: 12px; }
.bookmark-form .form-row { display: grid; gap: 4px; }
.bookmark-form label { font-size: 11px; font-weight: 700; }
.bookmark-form input, .bookmark-form textarea {
    padding: 8px 12px;
    border: 1px solid rgba(120,100,70,.25);
    background: #fff;
    font-size: 12px;
}
.theme-night .bookmark-form input, .theme-night .bookmark-form textarea {
    background: #282420;
    color: #fff;
    border-color: #444;
}
.bookmark-login-prompt { font-size: 12px; line-height: 1.7; }
.bookmark-login-prompt a { color: var(--red); text-decoration: underline; }

.reading-library-card { margin-bottom: 30px; }
.bookmarks-list { display: grid; gap: 14px; margin-top: 18px; }
.bookmark-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    background: #fff;
}
.bm-tibetan { font-size: 14px; color: var(--red); display: block; margin-bottom: 2px; }
.bm-chapter { font-size: 12px; color: var(--soft-ink); margin: 4px 0; }
.bm-note { font-size: 11px; color: var(--muted); margin: 2px 0; }
.bm-date { font-size: 10px; color: var(--muted); }
.reader-footer-nav {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(120,100,70,.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Audio & Podcast Player */
.article-audio-box {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    padding: 24px;
    margin: 20px 0 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.audio-kicker-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: .08em;
    display: block;
    margin-bottom: 8px;
}
.article-audio-box audio {
    width: 100%;
    outline: none;
    border-radius: 4px;
}

/* ==========================================================================
   Events & Monlam Schedule Styles
   ========================================================================== */
.events-page-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.events-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.events-list-grid {
    display: grid;
    gap: 22px;
}
.event-card-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.event-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.07);
}
.event-date-badge {
    background: var(--red);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    text-align: center;
}
.event-day {
    font: 700 28px/1 "Literata", Georgia, serif;
    letter-spacing: -0.02em;
}
.event-month {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
    color: rgba(255,255,255,.9);
}
.event-year {
    font-size: 10px;
    color: rgba(255,255,255,.7);
    margin-top: 2px;
}
.event-card-main {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}
.event-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.event-status-pill {
    display: inline-block;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 2px;
}
.event-status-pill.status-upcoming {
    background: rgba(197,155,39,.15);
    color: #8c6800;
}
.event-status-pill.status-ongoing {
    background: #e6f4ea;
    color: #137333;
}
.event-status-pill.status-completed {
    background: #f1f3f4;
    color: #5f6368;
}
.event-status-pill.status-cancelled {
    background: #fce8e6;
    color: #c5221f;
}
.event-organizer-pill {
    font-size: 11px;
    color: var(--muted);
}
.event-tibetan-title {
    font-size: 15px;
    color: var(--red);
    margin-bottom: 4px;
    line-height: 1.6;
}
.event-card-title {
    margin: 0 0 4px;
    font: 600 20px/1.3 "Literata", Georgia, serif;
}
.event-card-title a {
    color: var(--ink);
    text-decoration: none;
}
.event-card-title a:hover {
    color: var(--red);
}
.event-phonetic-sub {
    font-size: 12px;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 12px;
}
.event-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 8px 0 12px;
    padding: 10px 14px;
    background: rgba(120,100,70,.04);
    border: 1px solid rgba(120,100,70,.1);
    font-size: 12px;
    color: var(--soft-ink);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.event-card-excerpt {
    font-size: 12px;
    line-height: 1.65;
    color: var(--soft-ink);
    margin: 0 0 16px;
    flex-grow: 1;
}
.event-card-actions {
    display: flex;
    align-items: center;
}
.event-detail-btn {
    font-size: 12px;
    padding: 7px 16px;
}

/* Event Detail Page */
.event-detail-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.event-detail-header {
    margin-bottom: 24px;
}
.event-detail-tibetan {
    font-size: 18px;
    color: var(--red);
    margin-top: 10px;
    line-height: 1.6;
}
.event-detail-title {
    font: 600 28px/1.3 "Literata", Georgia, serif;
    color: var(--ink);
    margin: 6px 0 6px;
}
.event-detail-phonetic {
    font-size: 14px;
    font-style: italic;
    color: var(--muted);
}
.event-info-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.event-info-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.event-info-box .info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.event-info-box .info-val {
    font-size: 13px;
    color: var(--ink);
}
.event-detail-cover {
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.event-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
}
.event-guidelines-box {
    margin-top: 32px;
    padding: 20px 24px;
    background: rgba(197,155,39,.08);
    border: 1px solid rgba(197,155,39,.3);
    border-left: 4px solid var(--gold);
}
.event-guidelines-box h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--red-dark);
}
.event-guidelines-box ul {
    margin: 0;
    padding-left: 20px;
}
.event-guidelines-box li {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 6px;
    color: var(--soft-ink);
}
.event-detail-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

/* Homepage Events Grid */
.events-home-section {
    background: #faf8f5;
    padding: 48px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.events-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.event-home-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 2px 6px rgba(0,0,0,.03);
    overflow: hidden;
}
.event-home-date {
    background: var(--red-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    text-align: center;
}
.event-home-date .day {
    font: 700 22px/1 "Literata", Georgia, serif;
}
.event-home-date .month {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 3px;
}
.event-home-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.event-tibetan-home {
    font-size: 13px;
    color: var(--red);
    line-height: 1.5;
    margin-bottom: 2px;
}
.event-home-body h3 {
    margin: 2px 0 6px;
    font: 600 16px/1.3 "Literata", Georgia, serif;
}
.event-home-body h3 a {
    color: var(--ink);
    text-decoration: none;
}
.event-home-body h3 a:hover {
    color: var(--red);
}
.event-home-loc {
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 10px;
}
.event-home-link {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    margin-top: auto;
}
.event-home-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Contact Page Styles
   ========================================================================== */
.contact-page-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.contact-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-top: 24px;
}
@media (max-width: 768px) {
    .contact-grid-container {
        grid-template-columns: 1fr;
    }
    .event-card-item {
        grid-template-columns: 1fr;
    }
    .event-date-badge {
        flex-direction: row;
        gap: 8px;
        padding: 10px 16px;
    }
}
.contact-form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.contact-form-card h2 {
    font: 600 22px/1.3 "Literata", Georgia, serif;
    color: var(--red-dark);
    margin: 0 0 8px;
}
.contact-card-sub {
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 24px;
}
.contact-form {
    display: grid;
    gap: 16px;
}
.form-group {
    display: grid;
    gap: 6px;
}
.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: #faf8f5;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    border-radius: 2px;
    transition: border-color .15s ease, background-color .15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
    background: #fff;
}
.contact-submit-btn {
    margin-top: 8px;
    padding: 12px 24px;
    font-size: 13px;
}
.centers-card {
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--gold);
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.centers-card h2 {
    font: 600 22px/1.3 "Literata", Georgia, serif;
    color: var(--ink);
    margin: 0 0 8px;
}
.centers-card-lead {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 24px;
}
.center-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.center-item:last-of-type {
    border-bottom: none;
}
.center-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.center-details h3 {
    margin: 0 0 4px;
    font: 600 15px/1.3 "Literata", Georgia, serif;
    color: var(--ink);
}
.center-desc {
    font-size: 12px;
    color: var(--soft-ink);
    margin: 0 0 4px;
    line-height: 1.5;
}
.center-loc {
    font-size: 11px;
    color: var(--muted);
    margin: 0;
}
.contact-direct-box {
    margin-top: 24px;
    padding: 18px 20px;
    background: rgba(120,100,70,.06);
    border: 1px solid rgba(120,100,70,.15);
}
.contact-direct-box h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--red);
}
.contact-direct-box p {
    font-size: 12px;
    margin: 4px 0;
    color: var(--soft-ink);
}
.contact-direct-box a {
    color: var(--red);
    font-weight: 700;
}
.contact-hours {
    font-size: 11px !important;
    color: var(--muted) !important;
    margin-top: 8px !important;
}

/* ==========================================================================
   Order Complete & Bank Transfer VietQR Styles
   ========================================================================== */
.order-complete-section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.order-complete-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}
.order-success-icon {
    font-size: 48px;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
}
.order-complete-header h1 {
    font: 600 28px/1.3 "Literata", Georgia, serif;
    color: var(--red-dark);
    margin: 6px 0 10px;
}
.order-lead {
    font-size: 13px;
    line-height: 1.7;
    color: var(--soft-ink);
}
.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
@media (max-width: 768px) {
    .order-details-grid {
        grid-template-columns: 1fr;
    }
}
.order-info-card,
.payment-action-card {
    background: #fff;
    border: 1px solid var(--line);
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.order-info-card {
    border-top: 4px solid var(--red);
}
.payment-action-card {
    border-top: 4px solid var(--gold);
}
.order-info-card h2,
.payment-action-card h2 {
    font: 600 20px/1.3 "Literata", Georgia, serif;
    color: var(--ink);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.order-meta-table {
    display: grid;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 24px;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dotted var(--line);
}
.highlight-code {
    color: var(--red);
    font-family: monospace;
    font-size: 13px;
    letter-spacing: .05em;
}
.order-info-card h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin: 20px 0 10px;
}
.order-items-list {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}
.order-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(120,100,70,.1);
}
.order-totals-box {
    background: #faf8f5;
    padding: 16px;
    border: 1px solid var(--line);
    display: grid;
    gap: 6px;
    font-size: 12px;
}
.total-row {
    display: flex;
    justify-content: space-between;
}
.total-row.final-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--red);
}
.payment-note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--soft-ink);
    margin-bottom: 16px;
}
.vietqr-frame {
    text-align: center;
    background: #faf8f5;
    border: 1px solid var(--line);
    padding: 16px;
    margin-bottom: 20px;
}
.vietqr-frame img {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 8px;
    border: 1px solid rgba(0,0,0,.08);
}
.qr-caption {
    font-size: 11px;
    color: var(--muted);
    display: block;
}
.bank-details-box {
    display: grid;
    gap: 8px;
    font-size: 12px;
    background: rgba(197,155,39,.06);
    border: 1px solid rgba(197,155,39,.25);
    padding: 16px;
    margin-bottom: 16px;
}
.bank-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.field-label {
    color: var(--muted);
}
.field-value {
    color: var(--ink);
}
.highlight-num {
    font-family: monospace;
    font-size: 15px;
    color: var(--red);
}
.highlight-price {
    font-size: 15px;
    color: var(--red-dark);
}
.verification-note {
    font-size: 11px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 24px;
}
.cod-instruction-box {
    text-align: center;
    padding: 28px 16px;
    background: #faf8f5;
    border: 1px solid var(--line);
    margin-bottom: 24px;
}
.cod-icon {
    font-size: 40px;
    margin-bottom: 8px;
}
.cod-instruction-box p {
    font-size: 13px;
    line-height: 1.7;
    margin: 6px 0;
    color: var(--soft-ink);
}
.order-actions-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* Universal Search Page */
.universal-search-form {
    max-width: 760px;
    margin: 0 auto 36px;
}
.search-input-group {
    display: flex;
    gap: 8px;
}
.search-input-group input[type="search"] {
    flex: 1;
    min-height: 48px;
    padding: 0 16px;
    border: 2px solid var(--line);
    font-size: 15px;
    background: #fff;
    outline: none;
    transition: border-color .2s;
}
.search-input-group input[type="search"]:focus {
    border-color: var(--gold);
}
.search-input-group .portal-button {
    min-height: 48px;
    padding: 0 28px;
    font-size: 13px;
    white-space: nowrap;
}
.search-results-summary {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 12px 18px;
    background: var(--cream);
    border-left: 3px solid var(--gold);
    font-size: 14px;
    color: var(--soft-ink);
}
.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}
.search-suggestions a {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--red);
    font-size: 12px;
}
.search-suggestions a:hover {
    background: var(--cream);
    border-color: var(--gold);
}
.search-section-block {
    margin-bottom: 48px;
}
.search-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: 500 20px/1.3 "Literata", Georgia, serif;
    color: var(--red-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--line);
}
.search-section-title a {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
}
.search-entries-list {
    display: grid;
    gap: 16px;
}
.search-entry-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color .2s, box-shadow .2s;
}
.search-entry-item:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
.search-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-radius: 2px;
    white-space: nowrap;
    background: var(--sand);
    color: var(--soft-ink);
}
.badge-teachings { background: #e8d8be; color: #6a4e1a; }
.badge-lineage { background: #eed5d4; color: var(--red-dark); }
.badge-videos { background: #dbe4ee; color: #1f4268; }
.badge-podcasts { background: #d8ede3; color: #185e3b; }
.badge-news { background: #ede8db; color: #5a5444; }
.search-entry-body h3 {
    margin: 4px 0 6px;
    font: 500 17px/1.3 "Literata", Georgia, serif;
}
.search-entry-body h3 a {
    color: var(--red-dark);
}
.search-entry-body h3 a:hover {
    color: var(--red);
}
.search-entry-teacher {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    margin: 0 0 6px;
}
.search-entry-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: var(--soft-ink);
    margin: 0;
}

/* User Library Shelf */
.user-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.user-library-card {
    border: 1px solid var(--line);
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color .2s;
}
.user-library-card:hover {
    border-color: var(--gold);
}
.user-library-cover {
    height: 160px;
    background: var(--sand);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-library-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-library-card h4 {
    margin: 4px 0 2px;
    font-size: 14px;
    line-height: 1.3;
}
.user-library-card h4 a {
    color: var(--red-dark);
}
.user-library-card .book-author {
    font-size: 11px;
    color: var(--muted);
    margin: 0;
}
.user-library-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}
.btn-read-sm, .btn-download-sm {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--red);
}
.btn-read-sm {
    background: var(--red);
    color: #fff;
    flex: 1;
}
.btn-read-sm:hover {
    background: var(--red-dark);
}
.btn-download-sm {
    background: transparent;
    color: var(--red);
}
.btn-download-sm:hover {
    background: var(--cream);
}
