/* Giao diện chung của trang Ăn chay và Pháp môn: tối ấm như trang Nghe Pháp, nâu đỏ, vàng đồng. Ưu tiên điện thoại. */
:root {
  --bg: #170807; --panel: #24100d; --raise: #301612; --line: #4a2620; --line2: rgba(233,182,94,.28);
  --fg: #f6ead6; --muted: #c9ae8f; --gold: #e9b65e; --gold-deep: #b9822e; --brand: #7a2333; --ok: #8fd19e; --jade: #9ed6b0;
  --ink: #f6ead6; --glass-line: rgba(233,182,94,.35);
  --display: 'Literata', 'Noto Serif', Georgia, serif; --body: 'Be Vietnam Pro', 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 108px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body); }
body { background: radial-gradient(120% 60% at 50% -10%, #4a1610 0%, rgba(74,22,16,0) 60%), var(--bg); min-height: 100vh; overflow-x: hidden; }
a { color: var(--gold); }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #2a0b09, #3a0f0c); }
.brand { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--gold); text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--gold); }
.lang-switch { background: transparent; color: var(--muted); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 2px 6px; font: inherit; font-size: 13px; }
.lang-switch option { color: #222; }
.aa { border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--muted); border-radius: 8px; padding: 1px 8px; font-size: 13px; }
.aa[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-deep); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 48px max(16px, env(safe-area-inset-right, 0px)); }
.hero { padding: 28px 0 14px; display: grid; gap: 10px; }
.kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(28px, 6vw, 42px); line-height: 1.18; color: #fff3dc; text-wrap: balance; }
.lead { margin: 0; font-size: 16.5px; color: var(--fg); max-width: 62ch; }
.lunar { display: inline-flex; gap: 8px; align-items: center; font-size: 14.5px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(240,196,106,.07); width: fit-content; max-width: 100%; }
.lunar.today { background: rgba(158,214,176,.12); border-color: rgba(158,214,176,.45); }
.secnav { position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; margin: 4px -2px 8px; background: rgba(23,8,7,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { flex: 0 0 auto; text-decoration: none; color: var(--fg); font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.secnav a.on { border-color: var(--gold); color: var(--gold); }
section.sec { padding: 18px 0 8px; display: grid; gap: 14px; }
section.sec > h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(22px, 4.6vw, 28px); color: #fff3dc; display: flex; gap: 10px; align-items: center; }
section.sec > h2 .ic { font-size: .9em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 10px; min-width: 0; align-content: start; }
.card h3 { margin: 0; font-size: 17px; color: var(--gold); font-weight: 600; }
.card p { margin: 0; }
.prose { display: grid; gap: 10px; font-size: 16px; line-height: 1.65; }
.prose h3 { margin: 8px 0 0; font-size: 17px; color: var(--gold); font-weight: 600; }
.prose p { margin: 0; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose .note { font-size: 14px; color: var(--muted); padding: 10px 12px; border-left: 3px solid var(--gold-deep); background: rgba(240,196,106,.06); border-radius: 0 10px 10px 0; }
.prose .src { font-size: 13.5px; color: var(--muted); font-style: italic; }
.more { justify-self: start; border: 1px solid var(--line2); background: transparent; color: var(--gold); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.btn { border: 1px solid var(--line); background: var(--raise); color: var(--fg); padding: 11px 16px; border-radius: 12px; font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; }
.btn:hover { border-color: var(--gold-deep); }
.btn.pri { background: linear-gradient(#f0c46a, #c98f36); color: #2a0907; border: 0; font-weight: 600; }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: 10px; }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(240,196,106,.12); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 999px; padding: 7px 13px; font-size: 14px; min-height: 38px; }
.chip[aria-pressed="true"] { background: var(--gold); color: #2a0907; border-color: var(--gold); font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.tag.jade { color: var(--jade); border-color: rgba(158,214,176,.45); background: rgba(158,214,176,.08); }
.muted { color: var(--muted); }
.small-note { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shortcuts a { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, #2e130f, #200c0a); text-decoration: none; color: var(--fg); min-height: 92px; align-content: start; }
.shortcuts a b { font-size: 15.5px; }
.shortcuts a small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.shortcuts a .ic { font-size: 24px; line-height: 1; }
.shortcuts a:hover { border-color: var(--gold-deep); }
@media (min-width: 760px) { .shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Bảng trượt (chi tiết công thức) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(10,3,2,.6); display: grid; align-items: end; justify-items: center; }
.sheet-in { width: min(760px, 100%); max-height: 100%; height: 100%; overflow: auto; background: var(--bg); border-top: 1px solid var(--line); padding: 0 0 40px; overscroll-behavior: contain; }
@media (min-width: 760px) { .sheet { align-items: center; padding: 24px; } .sheet-in { height: auto; max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 18px; } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: rgba(23,8,7,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.sheet-head b { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .x { margin-left: auto; }
.sheet-body { padding: 16px 18px; display: grid; gap: 14px; }
/* Chữ to */
body.big-text { font-size: 18px; }
body.big-text .prose, body.big-text .lead { font-size: 18.5px; }
body.big-text .card h3, body.big-text .prose h3 { font-size: 19px; }
body.big-text .small-note, body.big-text .prose .note { font-size: 16px; }
body.big-text .chip, body.big-text .secnav a { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
footer.foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 18px 0 0; font-size: 13.5px; color: var(--muted); display: grid; gap: 8px; }
