/* ===================== MẬT HEALING – GIAO DIỆN ===================== */
:root {
  --primary: #B07A35; --dark: #2B2233; --light: #F7F1E6; --text: #2B2233; --accent: #7E9C7A;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif; --font-serif: "Playfair Display", Georgia, serif;
  --barc: var(--dark); --radius: 14px; --line: color-mix(in srgb, var(--text) 14%, transparent);
  --card: #fff; --muted: color-mix(in srgb, var(--text) 58%, transparent);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font-body); color: var(--text); background: var(--light); line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.on-deck { overflow: hidden; background: var(--dark); }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small, small { font-size: .82rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.row.between { justify-content: space-between; } .row.center { justify-content: center; }
.center { text-align: center; }

/* ---------- Thanh menu nổi ---------- */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 50; }
.bar-inner { display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--barc) 92%, transparent); color: #FFF8EE; backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0,0,0,.18); transition: background .6s ease; min-height: 58px; }
.brand { text-decoration: none; display: flex; align-items: center; flex-shrink: 0; }
.brand span { font-family: var(--font-serif); font-size: 1.35rem; letter-spacing: .08em; white-space: nowrap; }
.brand img { height: 38px; width: auto; }
.chapters { flex: 1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.chapters::-webkit-scrollbar { display: none; }
.chapters a, .mobile-nav a { text-decoration: none; font-size: .86rem; font-weight: 500; padding: 8px 13px; border-radius: 999px; white-space: nowrap; transition: background .2s; }
.chapters a:hover { background: rgba(255,255,255,.1); }
.chapters a.active { background: rgba(255,255,255,.2); font-weight: 700; }
.chapters a.locked, .mobile-nav a.locked { opacity: .62; }
.lock { font-style: normal; font-size: .72em; margin-left: 2px; }
.chapters .sep { width: 1px; height: 20px; background: rgba(255,255,255,.25); margin: 0 6px; flex-shrink: 0; }
.auth { position: relative; flex-shrink: 0; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid rgba(255,255,255,.55); background: transparent; color: inherit;
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .86rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill-btn:hover { background: rgba(255,255,255,.12); } .pill-btn:disabled { opacity: .35; cursor: default; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; font-size: .75rem; color: #fff; }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; color: var(--text); border-radius: 12px; min-width: 240px; padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.dropdown a, .dropdown button { text-align: left; padding: 9px 12px; border-radius: 8px; text-decoration: none; border: 0; background: none; cursor: pointer; font-size: .92rem; }
.dropdown a:hover, .dropdown button:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.dd-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.burger { display: none; background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }
.mobile-nav { margin-top: 8px; background: color-mix(in srgb, var(--barc) 96%, black); color: #FFF8EE; border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; max-height: 70vh; overflow: auto; }
.mobile-nav[hidden] { display: none; }
.mobile-nav hr { border: 0; border-top: 1px solid rgba(255,255,255,.2); width: 100%; }

/* ---------- Deck (trang chủ trình chiếu) ---------- */
.deck { position: fixed; inset: 0; container-type: size; overflow: hidden; background: var(--dark); }
.deck.preview { position: absolute; }
.slide { position: absolute; inset: 0; background-color: var(--sbg); background-size: cover; background-position: center; color: var(--sfg);
  opacity: 0; visibility: hidden; transform: translateX(3%); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1), visibility 0s .8s; }
.slide.before { transform: translateX(-3%); }
.slide.active { opacity: 1; visibility: visible; transform: none; transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.slide-scroll { height: 100%; overflow-y: auto; padding: max(96px, 13cqh) 6cqw max(96px, 13cqh); }
.slide-inner { max-width: 1240px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 2.2cqh; }
.slide-inner.center { align-items: center; text-align: center; }
.slide.active .slide-inner > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.slide.active .slide-inner > *:nth-child(2) { animation-delay: .08s; } .slide.active .slide-inner > *:nth-child(3) { animation-delay: .16s; } .slide.active .slide-inner > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .74rem; font-weight: 700; opacity: .9; }
.display { margin: 0; font-weight: 500; line-height: 1.02; letter-spacing: -.02em; font-size: clamp(2.2rem, 5vw, 4.2rem); }
.display span { display: block; font-family: var(--font-body); }
.display em { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.display.small { font-size: clamp(1.9rem, 4vw, 3rem); }
.deck .display { font-size: min(5.6cqw, 9.5cqh); text-shadow: 0 2px 30px rgba(0,0,0,.08); }
.deck h1.display { font-size: min(8.4cqw, 15cqh); }
.lead { font-size: 1.12rem; max-width: 46ch; margin: 0; opacity: .92; }
.deck .lead { font-size: min(1.5cqw, 2.6cqh, 1.35rem); min-height: 1em; }
.hero .btn { align-self: flex-start; margin-top: 1cqh; }
.slide-inner > .btn { align-self: flex-start; }

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 5cqw; }
.split.img-left .split-text { order: 2; }
.split-text { display: flex; flex-direction: column; gap: 2.2cqh; align-items: flex-start; }
.split-media img { border-radius: 22px; width: 100%; max-height: 62cqh; object-fit: cover; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.orb { aspect-ratio: 1; width: min(100%, 52cqh); margin: auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8 0, transparent 30%), radial-gradient(circle at 60% 65%, var(--primary), color-mix(in srgb, var(--primary) 30%, var(--sbg)) 70%);
  box-shadow: 0 0 120px color-mix(in srgb, var(--primary) 50%, transparent); animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05); filter: brightness(1.08); } }
.prose { font-size: 1.02rem; } .prose p { margin: 0 0 1em; } .prose h2, .prose h3 { font-family: var(--font-serif); font-weight: 500; }
.prose blockquote { border-left: 3px solid var(--primary); margin: 1em 0; padding: .2em 1em; font-style: italic; }
.prose img { border-radius: 12px; margin: 1em 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.glass-card { padding: 24px; border-radius: 18px; background: color-mix(in srgb, var(--sfg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--sfg) 18%, transparent); backdrop-filter: blur(6px); }
.glass-card h3 { margin: 10px 0 6px; font-family: var(--font-serif); font-weight: 500; font-size: 1.35rem; }
.glass-card p { margin: 0; opacity: .85; font-size: .95rem; }
.card-ico { font-size: 1.8rem; }

/* gói */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; max-width: 900px; width: 100%; }
.page .plans { margin: 30px auto 0; }
.plan { position: relative; padding: 28px; border-radius: 22px; background: color-mix(in srgb, var(--sfg, var(--text)) 6%, #fff8); border: 1px solid var(--line); color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.plan.hl { background: var(--dark); color: #FFF8EE; border-color: transparent; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.plan-badge { position: absolute; top: -12px; right: 20px; background: var(--primary); color: #fff; font-size: .74rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan-name { font-family: var(--font-serif); font-size: 1.8rem; font-style: italic; }
.plan-desc { opacity: .75; } .plan-price { font-size: 2rem; font-weight: 700; } .plan-price small { font-size: .9rem; font-weight: 400; opacity: .7; }
.plan ul { padding: 0; margin: 8px 0 14px; list-style: none; flex: 1; } .plan li { padding: 6px 0 6px 26px; position: relative; }
.plan li::before { content: '✦'; position: absolute; left: 0; color: var(--primary); }

/* sự kiện, bài viết */
.ev-list { display: flex; flex-direction: column; gap: 10px; }
.ev-item { display: flex; gap: 16px; align-items: center; text-decoration: none; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, currentColor 7%, transparent); border: 1px solid color-mix(in srgb, currentColor 14%, transparent); transition: transform .2s; }
.ev-item:hover { transform: translateX(4px); }
.ev-date { flex-shrink: 0; width: 58px; height: 58px; border-radius: 14px; background: var(--primary); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ev-date b { font-size: 1.4rem; } .ev-date small { font-size: .7rem; text-transform: uppercase; margin-top: 3px; }
.ev-date.big { width: 80px; height: 80px; } .ev-date.big b { font-size: 2rem; }
.ev-title { font-weight: 700; } .ev-meta { font-size: .85rem; opacity: .75; }
.post-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.post-card { text-decoration: none; border-radius: 18px; overflow: hidden; background: var(--card); color: var(--text); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.post-cover { aspect-ratio: 16/9; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 50%, var(--light)), var(--accent)); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 16px 18px 20px; } .post-body small { color: var(--muted); } .post-body h3 { margin: 6px 0; font-size: 1.12rem; line-height: 1.35; }
.post-body p { margin: 0; font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.deck .post-card .post-body p { -webkit-line-clamp: 2; }
.faq details { border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; } .faq details[open] summary::after { content: '–'; }
.faq p { margin: 10px 0 0; opacity: .85; }
.contact-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 22px; background: color-mix(in srgb, currentColor 8%, transparent); border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.contact-card a, .contact-card div { text-decoration: none; font-size: 1.15rem; font-weight: 600; display: flex; flex-direction: column; }
.contact-card small { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; opacity: .7; font-weight: 500; }
.disclaimer { font-size: .78rem; opacity: .7; font-weight: 400; margin: 0; }
.mini-link { font-size: .85rem !important; text-decoration: underline !important; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; } .gallery img { border-radius: 14px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption { font-size: .85rem; opacity: .8; margin-top: 6px; }
.lock-card { padding: 30px; border-radius: 22px; background: color-mix(in srgb, currentColor 8%, transparent); max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lock-ico { font-size: 2.4rem; }

/* thanh dưới */
.deckbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px 8px 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--sbar, var(--dark)) 92%, transparent); color: #FFF8EE; transition: background .6s; backdrop-filter: blur(10px); }
.deckbar[hidden] { display: none; }
.db-left { display: flex; align-items: center; gap: 12px; } .db-left b { font-size: 1.5rem; font-weight: 400; }
.db-line { width: 44px; height: 1px; background: rgba(255,255,255,.5); } #db-name { font-size: .85rem; font-weight: 600; margin-left: 18px; }
.db-right { display: flex; gap: 8px; }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 20px; border-radius: 6px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; background: color-mix(in srgb, var(--text) 8%, transparent); transition: transform .15s, filter .2s, background .2s; }
.btn:hover { filter: brightness(1.06); } .btn:active { transform: scale(.98); } .btn:disabled { opacity: .5; cursor: wait; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.light { background: #F4EDE1; color: #2B2233; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.btn.ghost { background: transparent; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.btn.danger { color: #B3261E; } .btn.lg { padding: 15px 26px; font-size: 1rem; } .btn.sm { padding: 6px 12px; font-size: .82rem; } .btn.block { width: 100%; margin-top: 10px; }
.icon-btn { border: 0; background: color-mix(in srgb, var(--text) 7%, transparent); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn.danger { color: #B3261E; }

/* ---------- Trang thường ---------- */
.page { min-height: 100vh; padding-top: 104px; display: flex; flex-direction: column; }
.page-inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 60px; flex: 1; }
.page-inner.narrow { max-width: 780px; }
.admin-page .page-inner { max-width: 1440px; }
.page-head { margin: 10px 0 28px; display: flex; flex-direction: column; gap: 10px; }
.page-head.center { align-items: center; text-align: center; } .page-head .eyebrow { color: var(--primary); }
.page .display em { color: var(--primary); }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; color: var(--muted); }
.article h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 8px 0 18px; }
.article .cover { width: 100%; border-radius: 18px; margin: 10px 0 22px; max-height: 460px; object-fit: cover; }
.article .lead { max-width: none; margin-bottom: 18px; font-size: 1.15rem; }
.site-foot { border-top: 1px solid var(--line); padding: 26px 20px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; max-width: 1180px; margin: 0 auto; width: 100%; }
.site-foot .disclaimer { flex-basis: 100%; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 18px; }
.card h3 { margin: 0 0 14px; }
.narrow-card { max-width: 760px; }
.upsell { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.upsell h2 { font-family: var(--font-serif); font-weight: 500; font-size: 2rem; margin: 6px 0; }
.banner { background: color-mix(in srgb, var(--primary) 12%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .92rem; }
.ok-box { background: #E7F3E6; color: #24572A; padding: 12px 16px; border-radius: 12px; margin-bottom: 10px; font-weight: 600; }
.reg-box { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.ev-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; } .ev-hero h1 { margin: 0 0 6px; }
.tag { display: inline-block; font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); margin: 6px 4px 0 0; font-weight: 600; }
.tag.gold { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chips.filter { margin-bottom: 20px; }
.chip { border: 1px solid var(--line); background: var(--card); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .86rem; text-decoration: none; }
.chip.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.deck .chip { background: transparent; border-color: color-mix(in srgb, currentColor 30%, transparent); }

/* lịch */
.cal-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
.cal { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; } .cal-grid small { color: var(--muted); padding: 4px 0; }
.day { position: relative; aspect-ratio: 1; border: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.day:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.day.has { background: color-mix(in srgb, var(--primary) 18%, transparent); font-weight: 700; }
.day.today { outline: 2px solid var(--primary); }
.day i { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: .62rem; background: var(--primary); color: #fff; border-radius: 999px; padding: 0 5px; }
.page-list .ev-item { background: var(--card); }

/* thanh toán */
.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qr { background: #fff; border-radius: 14px; padding: 12px; display: grid; place-items: center; border: 1px solid var(--line); }
.qr img { max-width: 300px; width: 100%; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 16px 0; } .bank dt { color: var(--muted); } .bank dd { margin: 0; }
.code { font-family: ui-monospace, monospace; background: color-mix(in srgb, var(--primary) 15%, transparent); padding: 2px 6px; border-radius: 6px; }
.copy { border: 1px solid var(--line); background: none; border-radius: 6px; font-size: .74rem; padding: 2px 8px; cursor: pointer; margin-left: 6px; }
.proof-prev img { max-height: 220px; border-radius: 10px; margin: 6px 0; }

/* tài khoản, thư viện */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; } .acc-grid .card { margin: 0; }
.member-badge { display: inline-flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; background: color-mix(in srgb, var(--text) 8%, transparent); font-weight: 700; margin-bottom: 14px; }
.member-badge small { font-weight: 400; } .member-badge.r1 { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.member-badge.r2, .member-badge.r9 { background: var(--dark); color: #fff; }
.li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.li:last-child { border-bottom: 0; }
.status { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); white-space: nowrap; }
.status.ok { background: #E3F1E2; color: #24572A; } .status.warn { background: #FFF1D6; color: #8A5A00; } .status.err { background: #FBE4E2; color: #9A2B22; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.lib-card { text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .2s; }
.lib-card:hover { transform: translateY(-3px); }
.lib-thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--dark), color-mix(in srgb, var(--primary) 60%, var(--dark))); display: grid; place-items: center; font-size: 2.4rem; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-body { padding: 14px 16px; } .lib-body h3 { margin: 6px 0 2px; font-size: 1.05rem; }
.player-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.player-wrap > div:only-child { grid-column: 1 / -1; }
.ratio { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.ratio iframe, .ratio video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
audio { width: 100%; }
.h-title { font-family: var(--font-serif); font-weight: 500; font-size: 1.9rem; margin: 18px 0 8px; }
.lessons { position: sticky; top: 100px; } .lesson { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px; border-radius: 10px; cursor: pointer; }
.lesson span { color: var(--primary); font-weight: 700; } .lesson.on { background: color-mix(in srgb, var(--primary) 14%, transparent); font-weight: 600; }
.auth-card { max-width: 460px; margin: 20px auto; padding: 32px; }
.auth-card .display { margin: 8px 0 18px; } .auth-card .eyebrow { color: var(--primary); }
.auth-links { margin-top: 16px; text-align: center; font-size: .9rem; }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; margin-bottom: 4px; }
.field > span { font-weight: 600; } .field.full { grid-column: 1 / -1; }
.field input:not([type=checkbox]):not([type=color]), .field select, .field textarea, .search, .row select {
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { outline: 2px solid color-mix(in srgb, var(--primary) 50%, transparent); border-color: var(--primary); }
.field.check { flex-direction: row; align-items: center; gap: 10px; } .field.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.field.check > span { font-weight: 500; }
.hint { color: var(--muted); font-size: .76rem; }
.color-row { display: flex; gap: 8px; } .color-row input[type=color] { width: 46px; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: #fff; }
.img-field { display: flex; gap: 14px; align-items: flex-start; } .img-ctrl { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.img-prev { width: 140px; height: 96px; border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-size: .75rem; text-align: center; }
.img-prev img { width: 100%; height: 100%; object-fit: contain; }
.list-field { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.list-items { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; gap: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: color-mix(in srgb, var(--text) 2%, transparent); }
.list-body { flex: 1; } .list-body .form-grid { margin: 0; } .list-tools { display: flex; flex-direction: column; gap: 4px; }
.form-sec { margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--primary); }

/* ---------- Admin / Studio ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; } .admin-head .eyebrow { color: var(--primary); }
.admin-head .h-title { margin: 6px 0 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 18px 0 20px; }
.tabs a { padding: 10px 16px; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 500; font-size: .92rem; }
.tabs a.on { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.toolbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { max-width: 300px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; } .table .actions .btn { margin-left: 4px; }
.table select { border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; } .thumb.zoom { cursor: zoom-in; }
.role-pill { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.role-pill.basic { background: color-mix(in srgb, var(--accent) 28%, transparent); } .role-pill.premium { background: color-mix(in srgb, var(--primary) 30%, transparent); }
.role-pill.editor { background: #DCE8F7; } .role-pill.admin { background: var(--dark); color: #fff; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.brand-note { background: color-mix(in srgb, var(--primary) 10%, #fff); padding: 14px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; }
code { background: color-mix(in srgb, var(--text) 8%, transparent); padding: 2px 6px; border-radius: 6px; font-size: .85em; }

/* builder */
.builder { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.b-side { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow: auto; }
.blist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; background: #fff; }
.bitem.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.bitem.off { opacity: .5; } .bitem.drag { opacity: .4; } .bitem.over { border-style: dashed; border-color: var(--primary); }
.grip { cursor: grab; color: var(--muted); } .swatch { width: 22px; height: 22px; border-radius: 6px; border: 4px solid; flex-shrink: 0; }
.bmeta { flex: 1; display: flex; flex-direction: column; min-width: 0; } .bmeta b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bmeta small { color: var(--muted); }
.btools { display: flex; gap: 2px; } .btools .icon-btn { width: 26px; height: 26px; font-size: .8rem; }
.sticky-save { position: sticky; bottom: -14px; background: var(--card); padding: 10px 0 4px; }
.b-preview-label { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.b-preview { position: relative; aspect-ratio: 16/9; width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.15); outline: none; }
.b-preview .slide-scroll { padding: 9cqh 6cqw; }

/* ---------- Modal, toast, loading ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(20,14,24,.55); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--light); color: var(--text); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal.wide { width: min(940px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); } .modal-head h3 { margin: 0; }
.modal-body { padding: 18px 20px; overflow: auto; } .modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--dark); color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: .92rem; animation: fade .25s; transition: opacity .4s; }
.toast.err { background: #9A2B22; } .toast.out { opacity: 0; }
.loading { display: flex; gap: 6px; justify-content: center; padding: 50px 0; }
.loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); animation: dot 1s infinite alternate; }
.loading span:nth-child(2) { animation-delay: .2s; } .loading span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { to { opacity: .2; transform: translateY(-6px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .post-row { grid-template-columns: 1fr 1fr; } .post-row > :nth-child(3) { display: none; } }
@media (max-width: 960px) {
  .chapters { display: none; } .burger { display: block; } .bar-inner { justify-content: space-between; }
  .hide-sm { display: none; }
  .split, .checkout, .cal-wrap, .player-wrap, .builder { grid-template-columns: 1fr; }
  .split.img-left .split-text { order: 0; }
  .split-media img, .orb { max-height: 34cqh; width: auto; margin: 0 auto; }
  .b-side { position: static; max-height: none; }
  .deck .display { font-size: min(9.5cqw, 7cqh); } .deck h1.display { font-size: min(13cqw, 9.5cqh); }
  .deck .lead { font-size: 1rem; }
  .slide-scroll { padding: 96px 20px 96px; }
  .slide-inner { justify-content: flex-start; gap: 16px; min-height: auto; padding: 4vh 0; }
  .slide-inner.hero { justify-content: center; min-height: 100%; }
  .post-row { grid-template-columns: 1fr; } .post-row > :nth-child(n+3) { display: none; }
  .lessons { position: static; }
}
@media (max-width: 640px) {
  .topbar { top: 8px; left: 8px; right: 8px; } .deckbar { left: 8px; right: 8px; bottom: 8px; }
  #db-name { display: none; } .form-grid { grid-template-columns: 1fr; }
  .page { padding-top: 88px; } .plans { grid-template-columns: 1fr; } .img-field { flex-direction: column; }
  .ev-hero { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.page .deck .display em { color: inherit; }
