@font-face {
    font-family: 'Maitreya Sans';
    src: url('../fonts/NotoSansTC.ttf') format('truetype');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
:root {
    --sans: 'Maitreya Sans', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
    --serif: var(--sans);
}
body { font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 500; letter-spacing: .045em; }
.brand .brand-wordmark { font-family: var(--sans); font-weight: 500; letter-spacing: .12em; white-space: nowrap; }
.brand .brand-ai { font-family: var(--sans); font-weight: 400; letter-spacing: .04em; margin-inline: .22em; }
.brand img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.footer-brand { justify-self: start; width: fit-content; max-width: 100%; text-align: center; }
.footer-brand .brand img { display: block; }
.footer-brand .brand { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.footer-brand .brand img { width: 80px; height: 80px; border: 1px solid #dfbd7c80; outline: 1px solid #dfbd7c26; outline-offset: 7px; box-shadow: 0 0 35px #7999df18; }
.footer-brand .brand-wordmark { font-size: 23px; }
.cosmic-hero h1 { font-weight: 450; letter-spacing: .04em; line-height: 1.6; }
.home-conversation { background: radial-gradient(ellipse at 15% 20%, #40345455, transparent 60%), #1a2036; border-block: 1px solid #b9a57f30; padding: 82px 0; }
.conversation-inner { display: flex; align-items: center; gap: 36px; }
.conversation-symbol { width: 100px; height: 100px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #ddbd7c66; border-radius: 50%; outline: 1px solid #ddbd7c1a; outline-offset: 9px; background: radial-gradient(circle, #e1bd7d12, transparent 70%); }
.conversation-symbol .icon { width: 42px; height: 42px; color: var(--gold-bright); }
.conversation-copy { flex: 1; }
.conversation-copy h2, .latest-heading h2 { font: 500 clamp(26px, 2.6vw, 34px)/1.6 var(--sans); letter-spacing: .06em; }
.conversation-copy p { font-size: 16px; color: var(--muted); margin-top: 14px; line-height: 1.9; }
.home-latest { background: #0c172c; padding: 88px 0 100px; }
.latest-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.home-latest .video-card h3 { font-weight: 500; font-size: 20px; line-height: 1.8; }
.home-latest .video-card p { display: none; }
.home-latest .video-art { border: 1px solid #8894b733; border-radius: 10px; }
:root[data-text-size="large"] .conversation-copy p { font-size: 21px; }
:root[data-text-size="large"] .home-latest .video-card h3 { font-size: 24px; }
@media (max-width: 900px) {
    .conversation-inner { flex-wrap: wrap; gap: 28px; }
    .conversation-inner > .button { margin-left: 128px; }
}
@media (max-width: 700px) {
    /* Center the Buddha itself, whose axis is right of the source image center. */
    .sacred-visual--hero img { object-position: 87% center; }
    .footer-brand { justify-self: center; }
    .footer-main { text-align: center; }
    .footer-bottom { justify-content: center; text-align: center; }
    .brand .brand-wordmark { letter-spacing: .06em; }
    .brand .brand-ai { margin-inline: .15em; }
    .home-conversation { padding: 60px 0; }
    .conversation-inner { flex-direction: column; text-align: center; }
    .conversation-symbol { width: 76px; height: 76px; }
    .conversation-symbol .icon { width: 32px; height: 32px; }
    .conversation-inner > .button { margin-left: 0; }
    .home-latest { padding: 56px 0 64px; }
    .latest-heading { gap: 12px; margin-bottom: 28px; }
    .latest-heading h2 { font-size: 26px; }
    .latest-heading .text-link { font-size: 16px; white-space: nowrap; }
}

/* About navigation disclosure, shared by desktop and mobile. */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; font: inherit; font-size: 14px; color: var(--muted); white-space: nowrap; }
.nav-dropdown-toggle > .icon { width: 14px; height: 14px; transition: transform .2s; }
.nav-dropdown-toggle[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.is-current, .nav-dropdown-toggle[aria-expanded="true"] { color: var(--gold-bright); }
.nav-submenu { position: absolute; top: 100%; left: -18px; min-width: 280px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #14213b; box-shadow: 0 16px 35px #0006; }
.nav-submenu[hidden] { display: none; }
.member-dropdown .nav-submenu { left: auto; right: 0; min-width: 170px; z-index: 50; }
.member-dropdown .nav-submenu form { margin: 0; }
.member-dropdown .nav-submenu a, .member-dropdown .nav-submenu button { display: block; width: 100%; padding: 12px 14px; min-height: 44px; border-radius: 5px; color: var(--text); text-align: left; font: inherit; font-size: 16px; }
.member-dropdown .nav-submenu :is(a, button):is(:hover, :focus-visible) { background: var(--surface-hover); color: var(--gold-bright); }
.nav-actions .member-dropdown > .nav-dropdown-toggle { width: auto; padding: 10px 12px; gap: 6px; }
.main-nav .nav-submenu a { display: block; padding: 13px 16px; border-radius: 5px; font-size: 16px; }
.main-nav .nav-submenu a:hover, .main-nav .nav-submenu a:focus-visible, .main-nav .nav-submenu a[aria-current] { background: #25334e; color: var(--gold-bright); }
.main-nav .nav-submenu a[aria-current]:after { display: none; }
:root[data-text-size="large"] .nav-dropdown-toggle { font-size: 18px; }
:root[data-text-size="large"] .nav-submenu a { font-size: 20px; }
@media (max-width: 1200px) {
    .main-nav .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 15px 0; }
    .main-nav .nav-submenu { position: static; min-width: 0; margin-bottom: 8px; box-shadow: none; }
    .main-nav.is-open { max-height: calc(100dvh - var(--header-height)); overflow-y: auto; }
}
@media (max-width: 700px) {
    .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 15px 0; }
    .nav-submenu { position: static; min-width: 0; margin-bottom: 8px; box-shadow: none; }
    .main-nav.is-open { max-height: calc(100dvh - var(--header-height)); overflow-y: auto; }
}
.video-art { aspect-ratio: 16 / 9; }
.video-card { min-width: 0; }
.video-card h3 { overflow-wrap: anywhere; line-height: 1.8; }
.video-external-link { display: inline-block; color: var(--gold); font-size: 16px; margin-top: 18px; }
.video-is-open { overflow: hidden; }
.video-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.video-dialog .dialog-header h2 { overflow-wrap: anywhere; line-height: 1.6; }

.footer-legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 24px; }
.footer-legal-links a { font-size: 14px; line-height: 1.8; }
.footer-legal-links a:hover, .footer-legal-links a[aria-current] { color: var(--gold-bright); }
.legal-page { max-width: 900px; padding-bottom: 80px; }
.legal-page .page-hero { padding-bottom: 32px; }
.legal-draft-note { padding: 24px; background: #1b253d; border: 1px solid #dfbd7c55; border-radius: 8px; }
.legal-draft-note strong { color: var(--gold-bright); font-size: 17px; font-weight: 500; }
.legal-draft-note p, .legal-content p { font-size: 16px; line-height: 2; color: var(--muted); overflow-wrap: anywhere; }
.legal-draft-note p { margin-top: 10px; }
.legal-content { margin: 36px 0; }
.legal-content section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.legal-content h2 { font-size: 22px; line-height: 1.7; margin-bottom: 14px; }
:root[data-text-size="large"] .legal-content p,
:root[data-text-size="large"] .legal-draft-note p { font-size: 21px; }
:root[data-text-size="large"] .legal-content h2 { font-size: 27px; }
:root[data-text-size="large"] .footer-legal-links a { font-size: 18px; }
@media (max-width: 700px) {
    .footer-bottom { flex-wrap: wrap; gap: 12px; }
    .legal-page { padding-bottom: 56px; }
    .legal-draft-note { padding: 20px; }
}

/* Shared gold-rimmed emblem, using our own brand artwork. */
.brand-emblem {
    --emblem-size: 104px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: var(--emblem-size);
    height: var(--emblem-size);
    padding: 4px;
    border-radius: 50%;
    background: conic-gradient(from 25deg, #fff9e7 0deg, #c19a52 42deg, #f4deb1 72deg, #ffffff 108deg, #d0aa63 145deg, #8f6c35 180deg, #efdaa8 218deg, #fffef5 252deg, #bb914a 294deg, #f8edce 330deg, #fff9e7 360deg);
    box-shadow: inset 0 0 0 1px #fff8e9cc, inset 0 0 0 2px #b48a4255, 0 1px 4px #00000030;
}
.brand-emblem::after { content: none; }
.brand > img, .footer-brand .brand > img { border: 2px solid #c9a354; outline: none; box-shadow: none; }
.app-dialog .button-danger { background: #a82d35; color: #fff; border-color: #a82d35; box-shadow: none; }
.app-dialog .button-danger:hover { background: #8f2028; }
.share-actions { flex-wrap: wrap; }
.share-consent { display: flex; gap: 10px; align-items: flex-start; margin-block: 18px; line-height: 1.7; }
.app-dialog .share-consent input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; }
#share-error { color: #c14646; }
#share-url { font-size: 14px; }
.conversation-menu { max-height: calc(100dvh - 16px); overflow-y: auto; }
.brand-emblem > img,
.footer-brand .brand .brand-emblem > img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    border-radius: 50%; border: 2px solid #111d2b;
    outline: none; box-shadow: none;
}
.footer-brand .brand-wordmark { color: #efdaa9; }
.page-emblem { --emblem-size: 86px; margin-bottom: 10px; }
@media (max-width: 700px) {
    .conversation-emblem { --emblem-size: 88px; }
    .page-emblem { --emblem-size: 76px; }
}

.site-header .brand-emblem { --emblem-size: 47px; padding: 2px; }
.site-header .brand-emblem::after { inset: -3px; }
.site-header .brand .brand-emblem > img { display: block; width: 100%; height: 100%; border: 1px solid #111d2b; }
.chat-welcome-emblem { --emblem-size: 86px; margin-bottom: 24px; }
@media (max-width: 900px) {
    .site-header .brand-emblem { --emblem-size: 38px; }
}
@media (max-width: 700px) {
    .site-header .brand-emblem { --emblem-size: 30px; }
    .chat-welcome-emblem { --emblem-size: 68px; margin-bottom: 20px; }
}
@media (max-width: 360px) {
    .site-header .brand { gap: 7px; }
    .site-header .brand-emblem { --emblem-size: 26px; }
}
@media (max-height: 780px) and (min-width: 851px) {
    .chat-welcome-emblem { --emblem-size: 64px; margin-bottom: 17px; }
}

/* A single alignment grid for chat navigation and account controls. */
.chat-page .chat-sidebar { padding: 20px 16px 0; }
.chat-page .sidebar-controls { flex-shrink: 0; }
.chat-page .new-chat { min-height: 48px; padding: 12px 14px; border-radius: 9px; gap: 12px; }
.chat-page .sidebar-search { margin: 12px 0 0; min-height: 44px; padding: 10px 14px; gap: 12px; background: #101c32; border: 1px solid #889bbb26; border-radius: 9px; }
.chat-page .sidebar-search:focus-within { border-color: var(--gold); }
.chat-page .history-heading { padding: 24px 14px 12px; letter-spacing: 0; }
.chat-page .history-heading > span:last-child { background: transparent; padding: 0; color: var(--subtle); }
.chat-page .history-empty { padding: 18px 14px; text-align: left; line-height: 1.9; margin: 0; }
.chat-page .conversation-list { padding-bottom: 16px; }
.chat-page .conversation-open { padding: 12px 14px; gap: 12px; }
.chat-page .sidebar-bottom { flex-shrink: 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.chat-page .sidebar-utilities { display: grid; gap: 2px; }
.chat-page .sidebar-utilities form { margin: 0; }
.chat-page .sidebar-action { min-height: 44px; padding: 10px 14px; gap: 12px; border-radius: 8px; text-align: left; }
.chat-page .sidebar-action > .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--subtle); }
.chat-page .local-profile { margin: 10px 0 0; padding: 16px 14px; gap: 12px; border-top: 1px solid var(--line); }
.chat-page .profile-avatar { width: 34px; height: 34px; flex-shrink: 0; font-size: 14px; }
.chat-page .sidebar-profile-copy { min-width: 0; }
.chat-page .sidebar-profile-copy strong { display: block; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-page .sidebar-profile-copy small { display: block; font-size: 14px; line-height: 1.6; margin-top: 3px; color: var(--subtle); }
.chat-page .sidebar-collapsed .chat-sidebar { padding-inline: 0; }
:root[data-text-size="large"] .sidebar-profile-copy strong { font-size: 19px; }
:root[data-text-size="large"] .sidebar-profile-copy small { font-size: 17px; }
@media (max-width: 850px) {
    .chat-page .sidebar-close-row { margin-bottom: 8px; }
    .chat-page .chat-sidebar { padding-top: 10px; }
}

.footer-bottom { flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.footer-credit { font-size: 14px; line-height: 1.8; }
.chat-page .footer-bottom { height: auto; min-height: 33px; gap: 4px 20px; }
@media (max-width: 700px) {
    .footer-credit { flex-basis: 100%; }
}

/* About: readable editorial sections with full, uncropped sacred artwork. */
.about-story { overflow: clip; }
.about-story .about-hero { padding-block: 65px; gap: 60px; }
.about-story .about-intro h1 { font-size: clamp(28px, 3vw, 42px); letter-spacing: .05em; }
:root .about-story .about-intro .about-opening { font-size: clamp(24px, 2.5vw, 32px); line-height: 1.7; color: var(--gold-bright); margin: 20px 0; }
.about-story .about-intro > p { font-size: 17px; line-height: 2; }
.about-story-section { padding: 80px 0; background: #121d34; border-block: 1px solid #929dc01c; }
.about-story-section--reverse { background: #191d33; }
.about-story-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 55px; align-items: center; }
.about-story-section--reverse .about-story-grid { grid-template-columns: 1.15fr 1fr; }
.about-story-section--reverse .about-story-figure { grid-column: 1; grid-row: 1; }
.about-story-section--reverse .about-story-copy { grid-column: 2; }
.about-section-label { color: var(--gold); font-size: 16px; letter-spacing: .14em; margin-bottom: 14px; }
.about-story-copy h2 { font-size: clamp(25px, 2.3vw, 32px); line-height: 1.6; margin-bottom: 24px; }
.about-story-copy > p:not(.about-section-label) { color: var(--muted); font-size: 17px; line-height: 2; margin-top: 18px; text-wrap: pretty; }
.about-story-figure { margin: 0; min-width: 0; }
.about-story-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; border: 1px solid #c6aa733d; border-radius: 12px; filter: brightness(.78) saturate(.85); }
.about-story-figure figcaption { margin-top: 14px; color: var(--subtle); font-size: 14px; text-align: center; line-height: 1.8; }
.about-story .virtues-lead { max-width: 760px; font-size: 17px; line-height: 2; }
.about-closing { text-align: center; padding-block: 65px; }
.about-closing p { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.9; color: var(--gold-bright); }
:root[data-text-size="large"] .about-story-copy > p:not(.about-section-label),
:root[data-text-size="large"] .about-story .about-intro > p:not(.about-opening),
:root[data-text-size="large"] .about-story .virtues-lead { font-size: 22px; }
@media (max-width: 900px) {
    .about-story .about-hero { gap: 30px; }
    .about-story-grid, .about-story-section--reverse .about-story-grid { gap: 30px; }
}
@media (max-width: 700px) {
    .about-story .about-hero { padding-block: 42px; }
    .about-story .about-intro h1 { font-size: 28px; }
    .about-desktop-break { display: none; }
    .about-story-section { padding-block: 48px; }
    .about-story-grid, .about-story-section--reverse .about-story-grid { grid-template-columns: 1fr; gap: 28px; }
    .about-story-section--reverse .about-story-copy, .about-story-section--reverse .about-story-figure { grid-column: auto; grid-row: auto; }
    .about-closing { padding-block: 45px; }
}

.about-banner { position: relative; isolation: isolate; background: #080f23; }
.about-banner-image { display: block; width: 100%; height: clamp(520px, 58vw, 800px); object-fit: cover; object-position: center top; filter: brightness(.7) saturate(.8); }
.about-banner::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, #080f23 0%, #080f2399 20%, transparent 55%), linear-gradient(90deg, #080f2366, transparent 65%); }
.about-banner-copy { position: absolute; bottom: 50px; left: 0; right: 0; z-index: 1; }
.about-banner-copy h1 { font-size: clamp(30px, 3.5vw, 46px); font-weight: 500; line-height: 1.6; text-shadow: 0 2px 18px #000a; }
.about-banner-copy p { color: var(--gold-bright); font-size: 20px; line-height: 1.8; margin-top: 12px; }
.about-story-section--text .about-story-grid { display: block; max-width: 850px; }
.about-story #explore.about-story-section { background: #191d33; box-shadow: none; scroll-margin-top: 100px; }
.about-story .invitation { margin-top: 55px; }
:root[data-text-size="large"] .about-banner-copy p { font-size: 24px; }
@media (max-width: 700px) {
    .about-banner-image { height: auto; aspect-ratio: 3/2; object-fit: contain; }
    .about-banner::after { display: none; }
    .about-banner-copy { position: relative; inset: auto; padding-block: 25px 38px; text-align: center; }
    .about-banner-copy h1 { font-size: 28px; }
    .about-banner-copy p { font-size: 18px; }
}
.ai-disclaimer { margin: 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ai-disclaimer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ai-disclaimer a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.footer-ai-note { padding-top: 16px; padding-bottom: 12px; text-align: center; }
.chat-footer-bar .ai-disclaimer { min-width: 0; }
/* Desktop footer copy should remain readable without enlarging the whole page. */
@media (min-width: 1024px) {
    .site-footer .footer-main h2 { font-size: 18px; }
    .site-footer .footer-main p, .site-footer .footer-main a:not(.brand),
    .site-footer .footer-bottom, .site-footer .footer-credit,
    .site-footer .footer-legal-links a, .site-footer .ai-disclaimer,
    .site-footer #chat-disclaimer, .site-footer .chat-footer-panel,
    .site-footer .chat-footer-details > summary { font-size: 16px; line-height: 1.9; }
    :root[data-text-size="large"] .site-footer .footer-main p,
    :root[data-text-size="large"] .site-footer .footer-main a:not(.brand),
    :root[data-text-size="large"] .site-footer .footer-bottom,
    :root[data-text-size="large"] .site-footer .footer-credit,
    :root[data-text-size="large"] .site-footer .footer-legal-links a,
    :root[data-text-size="large"] .site-footer .ai-disclaimer,
    :root[data-text-size="large"] .site-footer #chat-disclaimer,
    :root[data-text-size="large"] .site-footer .chat-footer-panel p,
    :root[data-text-size="large"] .site-footer .chat-footer-details > summary { font-size: 20px; }
}
.cosmic-hero .hero-actions { flex-wrap: wrap; }
.cosmic-hero .civilization-entry { gap: 7px; flex-wrap: wrap; white-space: normal; justify-content: center; line-height: 1.8; }
