:root {
  --ink: #0a1f2e;
  --ink-2: #0f2d42;
  --emerald: #0e5e4b;
  --gold: #c8a24a;
  --gold-soft: #e3c577;
  --bg: #fbfcfb;
  --bg-alt: #edf2ef;
  --surface: #ffffff;
  --text: #12202b;
  --muted: #4f5f6a;
  --line: #d5dfda;
  --accent-text: #0e5e4b;
  --on-dark: #f3f6f4;
  --on-dark-muted: #b4c4cc;
  --font: "Tiro Bangla", "Noto Serif Bengali", "Kalpurush", serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1821;
    --bg-alt: #0f202b;
    --surface: #132a37;
    --text: #e8efeb;
    --muted: #a9bac3;
    --line: #234051;
    --accent-text: #e3c577;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1821;
  --bg-alt: #0f202b;
  --surface: #132a37;
  --text: #e8efeb;
  --muted: #a9bac3;
  --line: #234051;
  --accent-text: #e3c577;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(5rem + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.85;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; font-weight: 400; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .3s, box-shadow .3s;
}
.site-header.solid {
  background: rgba(10, 31, 46, .94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(200, 162, 74, .25);
}
.header-in { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--on-dark); }
.brand-mark { width: 2.25rem; height: 2.7rem; flex: none; }
.brand-name { display: block; font-size: 1.25rem; line-height: 1.3; }
.brand-sub { display: block; font-size: .78rem; line-height: 1.3; color: var(--on-dark-muted); letter-spacing: .02em; }
.nav { display: flex; gap: 2rem; color: var(--on-dark); font-size: 1.05rem; }
.nav a { position: relative; padding: .25rem 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .25s;
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-btn {
  display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: var(--on-dark);
  width: 2.75rem; height: 2.75rem; border-radius: 50%; cursor: pointer; font: inherit; font-size: 1.1rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background:
    radial-gradient(70% 90% at 85% 30%, rgba(14, 94, 75, .55), transparent 70%),
    linear-gradient(160deg, var(--ink) 30%, var(--ink-2));
  padding: 8.5rem 0 7.5rem;
}
.lattice {
  position: absolute; inset: 0; opacity: .13; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23c8a24a' stroke-width='1'%3E%3Crect x='22' y='22' width='44' height='44'/%3E%3Crect x='22' y='22' width='44' height='44' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='9'/%3E%3Cpath d='M0 0L22 22M88 0L66 22M0 88L22 66M88 88L66 66'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 62%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 62%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
.kicker { display: flex; align-items: center; gap: .9rem; color: var(--gold-soft); font-size: 1.05rem; margin-bottom: 1.5rem; }
.kicker::before { content: ""; width: 3rem; height: 1px; background: var(--gold); }
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 1.3;
  max-width: 14ch;
  letter-spacing: -.005em;
}
.hero-lead { margin-top: 1.75rem; max-width: 34em; color: var(--on-dark-muted); font-size: 1.2rem; line-height: 1.9; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.75rem; border-radius: 999px; font: inherit; font-size: 1.05rem; line-height: 1.4;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); transform: translateY(-2px); }
.btn-line { border-color: rgba(243, 246, 244, .45); color: var(--on-dark); }
.btn-line:hover { border-color: var(--gold); color: var(--gold-soft); }

/* mihrab arch portrait */
.arch-wrap { position: relative; justify-self: center; width: min(400px, 100%); }
.arch-wrap::before, .arch-wrap::after {
  content: ""; position: absolute; border: 1px solid var(--gold);
  border-radius: 999px 999px 0 0; pointer-events: none;
}
.arch-wrap::before { inset: -14px -14px 0 -14px; opacity: .55; border-bottom: 0; }
.arch-wrap::after { inset: -30px -30px 0 -30px; opacity: .25; border-bottom: 0; }
.arch {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 999px 999px 0 0; background: var(--ink-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 22%; }
.arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 70%, rgba(10, 31, 46, .55)); }

/* the one orchestrated moment */
@keyframes arch-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.arch { animation: arch-in 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > * { animation: fade-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .12s; }
.hero-copy > :nth-child(3) { animation-delay: .24s; }
.hero-copy > :nth-child(4) { animation-delay: .36s; }

/* ---------- Quick strip ---------- */
.strip-wrap { position: relative; z-index: 5; margin-top: -3.4rem; }
.strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 24px 50px -28px rgba(10, 31, 46, .45);
}
.strip a { padding: 1.4rem 1.25rem; text-align: center; transition: background .2s; }
.strip a + a { border-left: 1px solid var(--line); }
.strip a:first-child { border-radius: 18px 0 0 18px; }
.strip a:last-child { border-radius: 0 18px 18px 0; }
.strip a:hover { background: var(--bg-alt); }
.strip b { display: block; font-weight: 400; font-size: 1.2rem; line-height: 1.5; }
.strip small { display: block; font-size: .92rem; color: var(--muted); line-height: 1.5; }

/* ---------- Sections ---------- */
section { padding: 6rem 0; }
.sec-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.75rem; }
.sec-head svg { width: 1.6rem; height: 1.6rem; color: var(--gold); flex: none; }
.sec-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.4; }
.alt { background: var(--bg-alt); }

/* about */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.about-name { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.35; color: var(--accent-text); }
.about-role { margin-top: .75rem; color: var(--muted); font-size: 1rem; }
.about-body p:first-child { font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.75; max-width: 30em; }
.about-body p + p { margin-top: 1.5rem; color: var(--muted); max-width: 34em; }

/* featured bayan */
.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.thumb { position: relative; min-height: 280px; background: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: var(--gold); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(200, 162, 74, .28); transition: transform .25s, box-shadow .25s;
}
.thumb:hover .play { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(200, 162, 74, .22); }
.play svg { width: 1.5rem; height: 1.5rem; margin-left: 3px; }
.feature-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.4rem; }
.feature-body h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.55; }
.feature-body p { color: var(--muted); }
.btn-ink { background: var(--emerald); color: #fff; }
.btn-ink:hover { background: #0b4a3b; transform: translateY(-2px); }

/* empty states */
.empty {
  display: grid; justify-items: center; gap: .9rem; text-align: center;
  padding: 3.5rem 1.5rem; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted);
}
.empty svg { width: 2.6rem; height: 3.1rem; color: var(--gold); }
.empty p { max-width: 28em; }

/* institutions */
.dark { background: linear-gradient(170deg, var(--ink), var(--ink-2)); color: var(--on-dark); position: relative; overflow: hidden; }
.dark .sec-head h2 { color: var(--on-dark); }
.inst-list { border-bottom: 1px solid rgba(243, 246, 244, .16); }
.inst {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.75rem; align-items: center;
  padding: 2rem 0; border-top: 1px solid rgba(243, 246, 244, .16); transition: padding .3s;
}
.inst:hover { padding-left: .75rem; }
.inst-mark { width: 3.4rem; height: 4rem; color: var(--gold); }
.inst h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.5; transition: color .2s; }
.inst:hover h3 { color: var(--gold-soft); }
.inst p { margin-top: .25rem; color: var(--on-dark-muted); max-width: 40em; }

/* contact */
.contact {
  position: relative; overflow: hidden; text-align: center; color: var(--on-dark);
  background: radial-gradient(80% 120% at 50% 120%, rgba(14, 94, 75, .8), transparent 70%), var(--ink);
}
.contact .lattice { -webkit-mask-image: radial-gradient(60% 80% at 50% 100%, #000, transparent 75%); mask-image: radial-gradient(60% 80% at 50% 100%, #000, transparent 75%); opacity: .16; }
.contact .wrap { position: relative; }
.contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.4; }
.contact-lines { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2.5rem; color: var(--on-dark-muted); font-size: 1.15rem; }
.contact-lines a { border-bottom: 1px solid rgba(200, 162, 74, .5); }
.contact-lines a:hover { color: var(--gold-soft); }
.contact .actions { justify-content: center; margin-top: 2.5rem; }

footer { background: #07161f; color: var(--on-dark-muted); text-align: center; padding: 1.4rem 0; font-size: .95rem; }


/* ---------- v2 additions ---------- */
.tools { display: flex; align-items: center; gap: 1.5rem; }
.icon-btn {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: none; border: 1px solid rgba(243, 246, 244, .4); color: var(--on-dark); cursor: pointer; padding: 0;
  transition: border-color .2s, color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-soft); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.menu-btn { display: none; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

.sec-head .car-ctl { margin-left: auto; display: flex; gap: .6rem; }
.sec-head .ctl { color: var(--text); border-color: var(--line); background: var(--surface); }
.sec-head .ctl:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.track {
  display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: .5rem; scroll-behavior: smooth;
}
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 calc((100% - 3rem) / 3); scroll-snap-align: start; display: flex; flex-direction: column; gap: .9rem; }
.slide h3 { font-size: 1.3rem; line-height: 1.6; }
.vlink { color: var(--accent-text); border-bottom: 1px solid currentColor; align-self: flex-start; line-height: 1.5; }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--ink); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb .play { width: 3.4rem; height: 3.4rem; box-shadow: 0 0 0 7px rgba(200, 162, 74, .28); }
.vthumb .play svg { width: 1.2rem; height: 1.2rem; }
.vthumb:hover .play { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(200, 162, 74, .22); }
.vtext { position: absolute; inset: 0; display: grid; align-items: end; padding: 1rem 1.1rem; color: #fff; font-size: 1.2rem; line-height: 1.5; max-width: 80%; z-index: 1; }
.vthumb::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23e3c577' stroke-width='1'%3E%3Crect x='22' y='22' width='44' height='44'/%3E%3Crect x='22' y='22' width='44' height='44' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='9'/%3E%3C/g%3E%3C/svg%3E"); opacity: .18; }
.vthumb.real::before { display: none; }
.vthumb.v1 { background: linear-gradient(135deg, #0a1f2e, #0e5e4b); }
.vthumb.v2 { background: linear-gradient(135deg, #123a52, #0a1f2e 70%); }
.vthumb.v3 { background: linear-gradient(135deg, #0e5e4b, #0a2a3a); }
.vthumb.v4 { background: linear-gradient(135deg, #5a4a1c, #0a1f2e 75%); }
.vthumb .play { z-index: 2; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; align-items: start; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cover { position: relative; aspect-ratio: 16 / 10; background: var(--ink); }
.cover svg { width: 100%; height: 100%; display: block; }
.chip { position: absolute; left: 1rem; top: 1rem; background: rgba(10, 31, 46, .85); color: var(--gold-soft); padding: .1rem .85rem; border-radius: 999px; font-size: .9rem; line-height: 1.7; }
.post-body { padding: 1.5rem 1.5rem 1.6rem; display: grid; gap: .6rem; }
.post-body time { font-size: .92rem; color: var(--muted); }
.post-body h3 { font-size: 1.4rem; line-height: 1.55; }
.post-body p { color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.post-body details { margin-top: .4rem; }
.post-body summary { cursor: pointer; color: var(--accent-text); list-style: none; display: inline-block; border-bottom: 1px solid currentColor; line-height: 1.5; }
.post-body summary::-webkit-details-marker { display: none; }
.post-body details[open] summary { margin-bottom: .8rem; }
.post-body .more { color: var(--text); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; gap: 1rem; }
.g { position: relative; margin: 0; border-radius: 16px; overflow: hidden; display: grid; place-items: center; align-content: center; gap: .4rem; color: rgba(243, 246, 244, .85); }
.g::before { content: ""; position: absolute; inset: 0; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23e3c577' stroke-width='1'%3E%3Crect x='22' y='22' width='44' height='44'/%3E%3Crect x='22' y='22' width='44' height='44' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='9'/%3E%3C/g%3E%3C/svg%3E"); }
.g svg { position: relative; width: 1.6rem; height: 1.6rem; color: var(--gold); }
.g figcaption { position: relative; font-size: .95rem; }
.g.w2 { grid-column: span 2; }
.g.h2 { grid-row: span 2; }
.g.a { background: linear-gradient(150deg, #0a1f2e, #0e5e4b); }
.g.b { background: linear-gradient(150deg, #123a52, #0a1f2e); }
.g.c { background: linear-gradient(150deg, #5a4a1c, #0a1f2e); }
.g.d { background: linear-gradient(150deg, #0e5e4b, #0a2a3a); }
.g.e { background: linear-gradient(150deg, #0a1f2e, #1c4a6a); }
.g.f { background: linear-gradient(150deg, #1c4a6a, #0e5e4b); }

.contact { text-align: left; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: start; }
.contact-lead { margin-top: 1rem; color: var(--on-dark-muted); }
.contact .contact-lines { flex-direction: column; justify-content: flex-start; gap: .4rem; }
.contact .contact-info .actions { justify-content: flex-start; }
.form { display: grid; gap: 1.1rem; background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 246, 244, .16); border-radius: 22px; padding: 2rem; }
.form label { display: grid; gap: .35rem; font-size: 1rem; color: var(--on-dark-muted); line-height: 1.6; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--on-dark); background: rgba(10, 31, 46, .55);
  border: 1px solid rgba(243, 246, 244, .25); border-radius: 12px; padding: .7rem .95rem; line-height: 1.6;
}
.form select option { color: #12202b; }
.form textarea { resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.form input.bad, .form textarea.bad { border-color: #e58f8f; }
.form .btn { justify-self: start; }
.form-note { font-size: .98rem; color: var(--gold-soft); min-height: 1.6em; }

@media (max-width: 960px) {
  .tools { gap: .75rem; }
  .menu-btn { display: grid; }
  .slide { flex-basis: calc((100% - 1.5rem) / 2); }
  .post-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 560px) {
  .slide { flex-basis: 84%; }
  .form { padding: 1.4rem; }
  .form .btn { justify-self: stretch; }
  .gallery .g.w2 { grid-column: span 2; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav {
    position: absolute; top: calc(4.5rem + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    flex-direction: column; gap: 0; background: rgba(10, 31, 46, .98); padding: .5rem 1.25rem 1rem;
    display: none; border-bottom: 1px solid rgba(200, 162, 74, .3);
  }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid rgba(243, 246, 244, .1); }
  .nav a::after { display: none; }
  .menu-btn { display: grid; }
  .hero { padding: 7rem 0 6.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .arch-wrap { width: min(320px, 84%); order: -1; }
  .hero h1 { max-width: none; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip a { border-left: 0 !important; border-radius: 0 !important; border-top: 1px solid var(--line); }
  .strip a:nth-child(-n+2) { border-top: 0; }
  .strip a:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .strip a:last-child { grid-column: 1 / -1; border-left: 0 !important; }
  .about-grid, .feature { grid-template-columns: 1fr; gap: 2rem; }
  .feature { gap: 0; }
  section { padding: 4.5rem 0; }
}
@media (max-width: 560px) {
  body { font-size: 1.05rem; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.1rem; }
  .feature-body { padding: 1.75rem 1.4rem; }
  .inst { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .inst-mark { width: 2.6rem; height: 3.1rem; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arch, .hero-copy > * { animation: none; }
  * { transition: none !important; }
}

/* ---------- v3: unified cards, gallery, dialogs ---------- */
.slide { display: block; }
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 24px 40px -28px rgba(10, 31, 46, .6); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); flex: none; }
.card-media img, .card-media > svg:not(.vstar) { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.card:hover .card-media img, .card:hover .card-media > svg:not(.vstar) { transform: scale(1.05); }
.card-media .chip { position: absolute; left: 1rem; top: 1rem; z-index: 3; }
.card-media .play { z-index: 2; }
.vstar { position: absolute; inset: 0; margin: auto; width: 38%; height: 38%; color: var(--gold); opacity: .22; }
.card-body { display: flex; flex-direction: column; gap: .55rem; padding: 1.35rem 1.4rem 1.2rem; flex: 1; }
.card-meta { display: flex; align-items: center; gap: .6rem; font-size: .92rem; color: var(--muted); line-height: 1.5; }
.card-meta::before { content: ""; width: .45rem; height: .45rem; background: var(--gold); transform: rotate(45deg); flex: none; }
.card-title { font-size: 1.22rem; line-height: 1.55; min-height: 3.1em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { color: var(--muted); font-size: 1rem; line-height: 1.75; min-height: 7em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot {
  margin-top: auto; padding: .9rem 0 0; border: 0; border-top: 1px solid var(--line); background: none;
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  font: inherit; font-size: 1.05rem; color: var(--accent-text); cursor: pointer; text-align: left; line-height: 1.5;
}
.go { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); transition: background .2s, color .2s, border-color .2s; }
.go svg { width: .95rem; height: .95rem; }
.card-foot:hover .go { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.card .vthumb::before { z-index: 0; }
.track { align-items: stretch; padding: .5rem .25rem 1rem; margin: -.5rem -.25rem 0; }
.post-grid { align-items: stretch; }

.gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gtile { position: relative; padding: 0; border: 0; margin: 0; aspect-ratio: 1; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--ink); }
.gtile.wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.gtile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.gtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 31, 46, .55)); opacity: 0; transition: opacity .3s; }
.gtile:hover img, .gtile:focus-visible img { transform: scale(1.06); }
.gtile:hover::after, .gtile:focus-visible::after { opacity: 1; }

dialog { color: var(--text); }
dialog::backdrop { background: rgba(5, 14, 20, .72); backdrop-filter: blur(3px); }
.modal { border: 0; padding: 0; background: transparent; width: min(680px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow: visible; }
.modal-box { position: relative; background: var(--surface); border-radius: 22px; overflow: hidden; max-height: calc(100vh - 2rem); overflow-y: auto; }
.pd-cover { aspect-ratio: 16 / 9; }
.pd-cover svg { width: 100%; height: 100%; object-fit: cover; }
.pd-body { padding: 1.75rem 2rem 2.25rem; display: grid; gap: .8rem; }
.pd-body h3 { font-size: 1.7rem; line-height: 1.5; }
.pd-body p { line-height: 1.9; }
.pd-body #pdText p + p { margin-top: 1rem; }
.modal-x { position: absolute; right: .9rem; top: .9rem; z-index: 5; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0; background: rgba(10, 31, 46, .8); color: #fff; display: grid; place-items: center; cursor: pointer; }
.modal-x svg { width: 1.1rem; height: 1.1rem; }
.lightbox { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(5, 14, 20, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 82vh; object-fit: contain; border-radius: 12px; display: block; }
.lb-btn { position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(243, 246, 244, .4); background: rgba(10, 31, 46, .7); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.lb-btn:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.lb-btn svg { width: 1.2rem; height: 1.2rem; }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev { left: 1.25rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1.25rem; top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; bottom: 1.25rem; left: 0; right: 0; text-align: center; color: var(--on-dark-muted); font-size: 1rem; }

@media (max-width: 960px) {
  .gal { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .card-desc { min-height: 0; -webkit-line-clamp: 4; }
}
@media (max-width: 560px) {
  .pd-body { padding: 1.4rem 1.3rem 1.8rem; }
  .lb-prev { left: .5rem; } .lb-next { right: .5rem; }
}
