/* ============================================================
   NikahCard — site.css — canonical shared chrome (header/footer)
   for every layouts.app page, plus shared site-page styles.
   Loaded after app.css/invite.css so legacy surfaces keep their
   base styles; everything here uses site-* classes or is scoped
   to body.platform chrome elements.
   Palette: forest #082A20 / ivory #F8F4EA / gold #B38A3E
   (extras/reference/prompt.md + extras/design/*.png).
   ============================================================ */

body.platform {
  --site-forest: #082A20;
  --site-darkgreen: #10392D;
  --site-ivory: #F8F4EA;
  --site-cream: #F1EBDD;
  --site-gold: #B38A3E;
  --site-gold-ink: #8A6A2E;
  --site-line: #e2dccb;
  --site-head-h: 80px;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ---------- primary button (forest) ---------- */
.site-btn-primary { background: var(--site-forest); color: var(--site-ivory); box-shadow: 0 2px 10px rgba(8, 42, 32, 0.26); }
.site-btn-primary:hover { background: var(--site-darkgreen); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(8, 42, 32, 0.32); }

/* ---------- canonical header ---------- */
.site-head { background: color-mix(in srgb, var(--site-ivory) 92%, transparent); border-bottom: 1px solid transparent; }
.site-head .head-in { height: var(--site-head-h); }
.site-head.scrolled { border-bottom-color: var(--site-line); background: color-mix(in srgb, var(--site-ivory) 97%, transparent); }
.site-brand { gap: 11px; text-decoration: none; }
.brand-orn { width: 34px; height: 34px; border-radius: 50%; border: 1.4px solid var(--site-gold); color: var(--site-gold-ink); display: grid; place-items: center; flex-shrink: 0; }
.brand-name { font-family: var(--display); font-weight: 640; font-size: 21px; letter-spacing: -0.01em; color: var(--site-forest); }
html[lang="bn"] .brand-name { font-family: var(--bn-serif); }
.site-nav a { position: relative; color: #4d554e; padding: 8px 4px; margin: 0 11px; border-radius: 0; }
.site-nav a:hover { color: var(--site-forest); background: none; }
.site-nav a::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: 1px; height: 1.6px; background: var(--site-gold); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out); }
.site-nav a:hover::after, .site-nav a.on::after { transform: scaleX(1); }
.site-nav a.on { color: var(--site-forest); background: none; font-weight: 600; }
.lang-form { display: inline-flex; margin: 0; }
.site-lang { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border: 1px solid var(--site-line); border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: transparent; transition: border-color 0.18s, color 0.18s; }
.site-lang:hover { border-color: var(--muted); color: var(--ink); }

/* Studio dropdown (native <details> — works without JS) */
.studio { position: relative; }
.studio-summary { list-style: none; cursor: pointer; }
.studio-summary::-webkit-details-marker { display: none; }
.studio-name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio[open] .studio-summary { box-shadow: 0 0 0 2px rgba(179, 138, 62, 0.4); }
.studio-drop { position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px; background: #fff; border: 1px solid var(--site-line); border-radius: 14px; box-shadow: 0 18px 44px -14px rgba(23, 37, 31, 0.25); padding: 8px; display: flex; flex-direction: column; z-index: 60; }
.studio-drop a, .studio-drop .studio-link { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.studio-drop a:hover, .studio-drop .studio-link:hover { background: var(--site-cream); color: var(--site-forest); }
.studio-drop .studio-admin { border-top: 1px solid var(--site-line); margin-top: 4px; color: var(--site-gold-ink); font-weight: 600; }
.studio-logout { border-top: 1px solid var(--site-line); margin-top: 4px; padding-top: 4px; }

/* canonical chrome only fits comfortably on wide desktop */
@media (max-width: 1279px) {
  .site-nav { display: none; }
  body.platform .menu-btn { display: grid; }
}
@media (min-width: 1280px) {
  body.platform .menu-btn { display: none; }
}
@media (max-width: 520px) {
  .head-right > .site-btn-primary { display: none; }
}
.mmenu { overflow-y: auto; }
.mmenu nav a { color: var(--site-forest); }
.mmenu .mmenu-foot { flex-direction: column; gap: 10px; }

/* ---------- canonical footer (extras/design/footer-design.png) ---------- */
.site-foot { position: relative; margin-top: 80px; background: transparent; border-top: 0; }
.site-foot::before, .site-foot::after { content: none; } /* clear legacy girih overlay */
/* full-bleed ivory panel; inner content centered ~1152px */
.site-foot-panel { position: relative; z-index: 2; width: 100%; max-width: none; margin-inline: 0; background: var(--site-ivory); border-top: 0; border-radius: 0 0 44px 44px; padding: 72px max(24px, calc((100% - 1152px) / 2)) 34px; box-shadow: inset 0 -1px 0 var(--site-gold); }
.site-foot-cols { display: grid; gap: 32px 40px; grid-template-columns: 1fr; }
@media (min-width: 360px) and (max-width: 1199px) {
  .site-foot-cols { grid-template-columns: 1fr 1fr; }
  .site-foot-brand, .site-foot-news { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .site-foot-cols { grid-template-columns: 1.6fr 1fr 1.4fr; gap: 0; }
  .site-foot-col { border-left: 1px solid rgba(179, 138, 62, 0.3); padding-left: 34px; margin-right: 34px; }
  .site-foot-brand, .site-foot-news { grid-column: auto; }
  .site-foot-news { border-left: 1px solid rgba(179, 138, 62, 0.3); padding-left: 34px; }
}
.site-foot-tag { font-family: var(--body); font-size: 11.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--site-gold-ink); margin-top: 14px; }
html[lang="bn"] .site-foot-tag { font-family: var(--bn); letter-spacing: 0.05em; }
.site-foot-blurb { font-size: 13.5px; line-height: 1.7; color: var(--muted); margin-top: 12px; max-width: 34ch; }
.site-foot-col h5, .site-foot-news h5 { font-family: var(--display); font-weight: 640; font-size: 19px; letter-spacing: 0; text-transform: none; color: var(--site-forest); margin-bottom: 16px; }
html[lang="bn"] .site-foot-col h5, html[lang="bn"] .site-foot-news h5 { font-family: var(--bn-serif); }
.site-foot-col a { display: block; width: fit-content; padding: 6px 0; font-size: 14px; color: #4d554e; text-decoration: none; }
.site-foot-col a:hover { color: var(--site-forest); }
.site-foot-news p { font-size: 13px; line-height: 1.65; color: var(--muted); }
.site-foot-note { margin-top: 10px; color: var(--site-gold-ink); font-weight: 600; }
.site-foot-err { margin-top: 10px; color: #a33a2a; font-weight: 600; }
.site-news-form { margin-top: 16px; }
.site-news-field { display: flex; align-items: center; background: #fff; border: 1px solid var(--site-line); border-radius: 52px; padding: 5px 5px 5px 20px; height: 52px; transition: border-color 0.18s, box-shadow 0.18s; }
.site-news-field:focus-within { border-color: var(--site-gold); box-shadow: 0 0 0 3px rgba(179, 138, 62, 0.16); }
.site-news-field input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; color: var(--ink); padding: 0; }
.site-news-field input:focus { outline: none; box-shadow: none; }
.site-news-send { width: 42px; height: 42px; border-radius: 14px; background: var(--site-forest); color: var(--site-ivory); display: grid; place-items: center; flex-shrink: 0; transition: background 0.18s, transform 0.18s; }
.site-news-send:hover { background: var(--site-darkgreen); transform: translateX(1px); }
.site-news-consent { display: block; margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.site-foot-socials { display: flex; gap: 10px; margin-top: 18px; }
.site-foot-socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(179, 138, 62, 0.45); color: var(--site-gold-ink); display: grid; place-items: center; }
.site-foot-socials a:hover { background: var(--site-gold); color: #fff; }
/* centered gold ornamental rule closing the ivory panel */
.site-foot-orn { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--site-gold); margin-top: 40px; }
.site-foot-orn span { display: block; width: 120px; height: 1px; background: rgba(179, 138, 62, 0.55); }
/* forest lower band behind the rounded ivory seam */
.site-foot-bar { position: relative; z-index: 1; margin-top: -44px; padding: 84px 24px 28px; background: var(--site-forest); color: #a9b8ae; font-size: 12.5px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-foot-bar::before { content: ''; position: absolute; inset: 0; opacity: 0.05; background-image: repeating-linear-gradient(60deg, var(--site-gold) 0 1px, transparent 1px 16px), repeating-linear-gradient(-60deg, var(--site-gold) 0 1px, transparent 1px 16px); pointer-events: none; }
.site-foot-dev { position: relative; z-index: 1; color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.18s, border-color 0.18s; }
.site-foot-dev:hover { color: var(--site-ivory); border-bottom-color: var(--site-gold); }
.site-foot-bar > span { position: relative; z-index: 1; }
.site-foot-bar > span:only-child { flex: 1; text-align: center; }
@media (max-width: 820px) {
  .site-foot { margin-top: 56px; }
  .site-foot-panel { padding-top: 44px; }
  .site-foot-cols { gap: 26px; }
  .site-foot-orn { margin-top: 28px; }
  .site-foot-bar { padding-bottom: 24px; }
}
@media (max-width: 640px) { .site-foot-bar { justify-content: center; text-align: center; } }
/* minimal footer (sign-in): copyright band pinned to the bottom of the viewport */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-page > #nc-main { flex: 1 0 auto; }
.site-foot--minimal { margin-top: 48px; }
.auth-page .site-foot--minimal { margin-top: auto; }
.site-foot--minimal .site-foot-bar { margin-top: 0; padding: 22px 24px; }
/* botanical margins flanking the ivory panel */
.site-foot-art { position: absolute; bottom: 90px; z-index: 1; pointer-events: none; opacity: 0.9; }
.site-foot-art img { display: block; height: auto; max-height: 480px; width: auto; }
.site-foot-art--l { left: 0; }
.site-foot-art--r { right: 0; }
@media (max-width: 1450px) { .site-foot-art { opacity: 0.35; } .site-foot-art img { max-height: 360px; } }
@media (max-width: 1100px) { .site-foot-art { display: none; } }

/* ---------- shared site pages ---------- */
.site-page { padding: clamp(60px, 6vw, 90px) 0; background: var(--site-ivory); }
.site-page-head { max-width: 640px; margin-bottom: 40px; }
.site-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--site-gold-ink); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.site-eyebrow::before { content: ''; width: 30px; height: 1.5px; background: var(--site-gold); }
html[lang="bn"] .site-eyebrow { font-family: var(--bn); letter-spacing: 0.05em; }
.site-page-head h1 { font-family: var(--display); font-weight: 640; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.1; letter-spacing: -0.015em; color: var(--site-forest); }
html[lang="bn"] .site-page-head h1 { font-family: var(--bn-serif); }
.site-page-head .sub { margin-top: 14px; font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.site-card { background: #fff; border: 1px solid var(--site-line); border-radius: 18px; padding: clamp(24px, 3.5vw, 40px); box-shadow: 0 14px 34px -20px rgba(23, 37, 31, 0.16); }
.site-form { max-width: 560px; }
.site-form .field { margin-bottom: 18px; }
.site-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.site-ok { background: #e6f2ea; border: 1px solid #bcd8c5; color: #1d5b3a; border-radius: 12px; padding: 14px 18px; font-size: 14px; font-weight: 600; margin-bottom: 22px; }
.site-info { max-width: 720px; }
.site-info .site-card p { font-size: 15px; line-height: 1.7; color: var(--muted); }
.site-info ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.site-info li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.65; color: #3c443e; }
.site-info li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; background: var(--site-gold); transform: rotate(45deg); }
.site-faq details { border: 1px solid var(--site-line); border-radius: 14px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.site-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 650; font-size: 15px; color: var(--site-forest); }
.site-faq summary::-webkit-details-marker { display: none; }
.site-faq summary::after { content: ''; width: 9px; height: 9px; border-right: 1.6px solid var(--site-gold-ink); border-bottom: 1.6px solid var(--site-gold-ink); transform: rotate(45deg) translateY(-2px); flex-shrink: 0; transition: transform 0.2s; }
.site-faq details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.site-faq details[open] summary { border-bottom: 1px solid var(--site-line); }
.site-faq details > div { padding: 16px 22px 20px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }

/* ---------- contact page: forest desk panel + overlapping form card ---------- */
.contact-page.site-page { padding-top: clamp(36px, 4.5vw, 56px); padding-bottom: clamp(48px, 5vw, 72px); }
.contact-page .site-page-head { margin-bottom: 24px; }
.contact-page .site-page-head .sub { margin-top: 10px; }
.ct-shell { display: grid; gap: 24px; align-items: start; }
.ct-side { position: relative; overflow: hidden; border-radius: 26px; padding: clamp(18px, 2.6vw, 28px); background: var(--site-forest); color: #ece5d3; }
.ct-side::before { content: ''; position: absolute; inset: 0; opacity: 0.06; background-image: repeating-linear-gradient(60deg, var(--site-gold) 0 1px, transparent 1px 14px), repeating-linear-gradient(-60deg, var(--site-gold) 0 1px, transparent 1px 14px); pointer-events: none; }
.ct-art { position: relative; margin: 0 0 8px; border-radius: 999px 999px 18px 18px; overflow: hidden; border: 1px solid rgba(179, 138, 62, 0.55); box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.55); }
.ct-art::after { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(179, 138, 62, 0.35); border-radius: inherit; pointer-events: none; }
.ct-art img { display: block; width: 100%; height: clamp(200px, 24vw, 280px); object-fit: cover; object-position: 50% 52%; }
.ct-chans { position: relative; display: flex; flex-direction: column; }
.ct-chan { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-top: 1px solid rgba(248, 244, 234, 0.14); color: #ece5d3; text-decoration: none; transition: color 0.18s; }
.ct-chan:hover { color: #fff; }
.ct-chan:hover .ct-chan-arrow { transform: translateX(3px); }
.ct-chan-ico { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid rgba(179, 138, 62, 0.55); border-radius: 50%; color: #d9bc7e; }
.ct-chan-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ct-chan-t b { font-size: 14.5px; font-weight: 600; }
.ct-chan-t small { font-size: 12.5px; line-height: 1.45; color: rgba(236, 229, 211, 0.62); }
.ct-chan-arrow { color: #d9bc7e; flex-shrink: 0; transition: transform 0.18s; }
.ct-socials { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.ct-socials-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(236, 229, 211, 0.5); }
.ct-side .site-foot-socials { display: flex; gap: 10px; }
.ct-side .site-foot-socials a { border-color: rgba(179, 138, 62, 0.55); color: #d9bc7e; }
.ct-alt { position: relative; margin-top: 18px; font-size: 13px; line-height: 1.65; color: rgba(236, 229, 211, 0.55); }
.ct-card { position: relative; z-index: 2; background: #fffdf8; border: 1px solid var(--site-line); border-radius: 22px; padding: clamp(24px, 3vw, 40px); box-shadow: 0 26px 54px -26px rgba(23, 37, 31, 0.3); }
@media (min-width: 980px) {
  .ct-shell { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); gap: 0; }
  .ct-side { padding: clamp(24px, 3vw, 40px); }
  .ct-card { margin: clamp(26px, 3.5vw, 46px) 0 clamp(18px, 2.5vw, 32px) -56px; }
}
.ct-form-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--site-gold-ink); margin-bottom: 20px; }
.ct-form-eyebrow svg { color: var(--site-gold); flex-shrink: 0; }
html[lang="bn"] .ct-form-eyebrow { font-family: var(--bn); letter-spacing: 0.05em; }
.ct-row { display: grid; }
@media (min-width: 640px) { .ct-row { grid-template-columns: 1fr 1fr; column-gap: 16px; } }
.ct-card .field input, .ct-card .field textarea { padding: 13px 16px; border-radius: 13px; background: #fff; }
.ct-send { width: 100%; height: 54px; border: 0; border-radius: 999px; background: var(--site-forest); color: var(--site-ivory); font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform 0.18s, background 0.18s, box-shadow 0.18s; }
.ct-send:hover { background: var(--site-darkgreen); transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(8, 42, 32, 0.5); }
.ct-send svg { transition: transform 0.18s; }
.ct-send:hover svg { transform: translateX(3px); }
.ct-send-note { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
.ct-ok { display: flex; align-items: center; gap: 14px; background: #eef4ec; border: 1px solid #c9dcc9; border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }
.ct-ok-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--site-forest); color: var(--site-gold); display: grid; place-items: center; }
.ct-ok p { font-size: 14px; font-weight: 600; color: #1d5b3a; line-height: 1.5; }

/* ---------- admin inbox (Phase 1 — functional, full reskin later) ---------- */
.admin-inbox { padding: 40px 0 70px; background: var(--site-ivory); }
.admin-inbox h1 { font-family: var(--display); font-weight: 640; font-size: 30px; color: var(--site-forest); margin-bottom: 22px; }
.admin-inbox table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--site-line); border-radius: 14px; overflow: hidden; font-size: 13.5px; }
.admin-inbox th { text-align: left; padding: 12px 14px; background: var(--site-cream); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--site-gold-ink); }
.admin-inbox td { padding: 14px; border-top: 1px solid var(--site-line); vertical-align: top; }
.admin-inbox .msg-body { max-width: 380px; white-space: pre-wrap; }
.admin-inbox select, .admin-inbox textarea { font: inherit; }
.admin-inbox textarea { width: 220px; min-height: 56px; }
.admin-inbox .badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge--active { background: #e6f2ea; color: #1d5b3a; }
.badge--pending { background: #f6ecd4; color: var(--site-gold-ink); }
.badge--off { background: #eceae4; color: var(--muted); }
.admin-inbox .pager { margin-top: 18px; }
.admin-inbox-empty { background: #fff; border: 1px dashed var(--site-line); border-radius: 14px; padding: 40px; text-align: center; color: var(--muted); }
@media (max-width: 820px) { .admin-inbox table { display: block; overflow-x: auto; } }

.pager nav { display: flex; justify-content: center; }

/* detail page: section thumbs + fullscreen preview dialog */
.sec-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sec-thumb { padding: 6px 14px; border: 1px solid var(--site-line); border-radius: 999px; font-size: 12px; text-transform: capitalize; color: var(--muted); background: #fff; }
.sec-thumb:hover { border-color: var(--site-gold); color: var(--site-forest); }
.invfs { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 26, 20, 0.92); display: flex; flex-direction: column; }
.invfs-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; color: #e8e2d2; font-size: 13px; border-bottom: 1px solid rgba(232, 226, 210, 0.15); }
.invfs-bar .menu-btn { color: inherit; }
.invfs-body { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 32px 16px; }
.invfs-body .inv-root { width: 100%; max-width: 420px; height: fit-content; }
@media (min-width: 900px) { .invfs-body .inv-root { max-width: 960px; } }

/* ============================================================
   Platform base — settle non-home pages on forest/ivory/gold
   ============================================================ */
body.platform:not(.homepage) {
  --accent: #0e5c46;
  --accent-deep: #0a4536;
  --ink: #22271f;
}
body.platform:not(.homepage) > main h1:not(.inv-root *), body.platform:not(.homepage) > main h2, body.platform:not(.homepage) > main h3 { font-family: var(--display); color: var(--site-forest); }
.inv-root *, .invctx * { font-family: inherit; }
body.locked { overflow: hidden; }

/* ============================================================
   CATALOG — extras/design/designs.png
   ============================================================ */
/* catalog — category tabs, toolbar and cards */
.cat { padding-bottom: 40px; }
.cat-bar { max-width: 1200px; margin: 0 auto; padding: 36px 28px 0; display: flex; flex-direction: column; gap: 16px; }
.cat-tabs { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid rgba(179,138,62,.28); }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { position: relative; flex-shrink: 0; padding: 10px 16px 14px; font-size: 14px; font-weight: 560; letter-spacing: .02em; color: #6f7c6c; text-decoration: none; white-space: nowrap; transition: color .2s ease; }
.cat-tab::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; background: var(--site-gold); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.cat-tab:hover { color: var(--site-forest); }
.cat-tab.on { color: var(--site-forest); font-family: var(--display); font-size: 17px; font-weight: 500; }
.cat-tab.on::after { transform: scaleX(1); }
.cat-tab:focus-visible { outline: 2px solid var(--site-gold); outline-offset: 2px; border-radius: 6px; }
.cat-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cat-count { margin: 0; font-size: 13px; color: var(--muted); }
.cat-count b { color: var(--site-forest); font-weight: 650; }
.cat-select { position: relative; display: inline-flex; margin-left: auto; }
.cat-select select { appearance: none; -webkit-appearance: none; border: 1px solid rgba(179,138,62,.35); border-radius: 999px; background: #fff; padding: 9px 38px 9px 16px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--site-forest); cursor: pointer; transition: border-color .2s ease; }
.cat-select select:hover { border-color: var(--site-gold-ink); }
.cat-select select:focus-visible { outline: 2px solid var(--site-gold); outline-offset: 2px; }
.cat-select::after { content: ''; position: absolute; right: 16px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid #a8862f; border-bottom: 1.5px solid #a8862f; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cat-fav { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(179,138,62,.35); background: #fff; color: var(--site-forest); font-size: 12.5px; font-weight: 600; text-decoration: none; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.cat-fav i { font-style: normal; color: #b0654a; }
.cat-fav:hover { border-color: var(--site-gold-ink); }
.cat-fav.on { background: var(--site-forest); border-color: var(--site-forest); color: #f5efe0; }
.cat-fav.on i { color: var(--site-gold); }
.cat-body { max-width: 1200px; margin: 34px auto 0; padding: 0 28px; }
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 26px; }
@media (max-width: 1100px) { .tpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; } }
.tpl-card { position: relative; }
.tpl-frame { position: relative; aspect-ratio: 2 / 3; padding: 9px; border-radius: 18px; background: linear-gradient(180deg, #fffdf8, #f6f1e4); border: 1px solid rgba(179,138,62,.3); box-shadow: 0 1px 2px rgba(8,26,20,.05), 0 14px 30px -20px rgba(8,26,20,.3); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s cubic-bezier(.16,1,.3,1), border-color .35s ease; }
.tpl-frame .pv-slot { position: absolute; inset: 9px; display: block; border-radius: 11px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(8,26,20,.1); }
.tpl-frame .pv-slot .inv-root, .tpl-frame .pv-slot .inv { pointer-events: none; }
.tpl-card:hover .tpl-frame, .tpl-card:focus-within .tpl-frame { transform: translateY(-5px); border-color: rgba(179,138,62,.55); box-shadow: 0 2px 4px rgba(8,26,20,.05), 0 26px 44px -22px rgba(8,26,20,.38); }
.tpl-fav { position: absolute; top: 16px; right: 16px; z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,253,248,.94); border: 1px solid rgba(179,138,62,.3); color: #b0654a; font-size: 15px; box-shadow: 0 4px 12px -6px rgba(8,26,20,.35); transition: transform .2s ease, border-color .2s ease; }
.tpl-fav:hover { transform: scale(1.06); border-color: var(--site-gold); }
.tpl-fav.on { color: var(--site-gold-ink); }
.tpl-meta { display: flex; flex-direction: column; gap: 6px; padding: 16px 4px 0; }
.tpl-meta h3 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: var(--site-forest); }
.tpl-meta h3 a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--site-gold), var(--site-gold)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s ease; }
.tpl-card:hover .tpl-meta h3 a { background-size: 100% 1px; }
.tpl-cats { margin: 7px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--site-gold-ink); }
@media (hover: none) { .tpl-card:hover .tpl-frame { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tpl-frame, .tpl-fav, .tpl-meta h3 a { transition: none; } .tpl-card:hover .tpl-frame { transform: none; } }
/* compact paginator */
.cat-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 42px 0 10px; }
.cat-pager a, .cat-pager span.cp-dots { min-width: 38px; height: 38px; padding: 0 8px; display: grid; place-items: center; border-radius: 10px; font-size: 13.5px; text-decoration: none; color: var(--site-forest); border: 1px solid transparent; }
.cat-pager a { border-color: rgba(179,138,62,.35); background: #fff; }
.cat-pager a:hover { border-color: var(--site-gold); }
.cat-pager a.cp-on { background: var(--site-forest); color: #f5efe0; border-color: var(--site-forest); }
.cat-pager span.cp-dots { color: var(--muted); }

/* ============================================================
   DETAIL — extras/design/design-details.png
   ============================================================ */
.dt-crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.dt-crumbs a { color: var(--muted); text-decoration: none; }
.dt-crumbs a:hover { color: var(--site-forest); }
.dt-crumbs span { color: var(--site-forest); font-weight: 600; }
.dt-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; }
@media (max-width: 980px) { .dt-grid { grid-template-columns: 1fr; } }
/* cream architectural stage */
.dt-stage { position: relative; border-radius: 26px; border: 1px solid rgba(179,138,62,.35); background: linear-gradient(160deg, #f7f1e2 0%, #efe6d0 100%); padding: 30px 34px 26px; overflow: hidden; }
.dt-stage::before, .dt-stage::after { content: ''; position: absolute; width: 150px; height: 300px; opacity: .5; pointer-events: none; background-size: contain; background-repeat: no-repeat; }
.dt-stage::before { left: -30px; top: 40px; background-image: url('/assets/site/foot-left.webp'); }
.dt-stage::after { right: -34px; bottom: 20px; background-image: url('/assets/site/foot-right.webp'); }
.dt-stage-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dt-head-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.dt-stage-hint { font-size: 12px; color: var(--muted); }
.dt-stage-in { position: relative; z-index: 2; display: grid; grid-template-columns: 74px 1fr; gap: 20px; align-items: center; }
.dt-railcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dt-rail-cap { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--site-gold-ink); text-align: center; }
.dt-rail { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.dt-thumb { position: relative; border: 1px solid rgba(179,138,62,.4); border-radius: 10px; background: #fff; overflow: hidden; aspect-ratio: 1/1.25; cursor: pointer; padding: 0; }
.dt-thumb .dt-thumb-in { position: absolute; inset: 0; transform-origin: top left; pointer-events: none; }
.dt-thumb.on { border-color: var(--site-forest); box-shadow: 0 0 0 2px rgba(8,42,32,.25); }
.dt-thumb b { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--site-forest); background: rgba(255,255,255,.9); text-align: center; padding: 3px 2px; }
.dt-phonecol { display: flex; flex-direction: column; align-items: center; }
.dt-nav { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.dt-nav b { font-size: 12px; color: var(--site-forest); letter-spacing: .1em; min-width: 64px; text-align: center; }
.dt-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(179,138,62,.45); background: #fff; color: var(--site-forest); font-size: 16px; display: grid; place-items: center; cursor: pointer; }
.dt-nav button:hover { border-color: var(--site-gold); }
.dt-info h1 { font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 640; line-height: 1.08; color: var(--site-forest); }
.dt-desc { margin-top: 14px; font-size: 14.5px; line-height: 1.75; color: #5a635a; }
.dt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dt-label { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--site-gold-ink); }
.dt-note { font-size: 12px; line-height: 1.55; color: var(--muted); margin-top: 12px; max-width: 46ch; }
.dt-bar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dt-bar-cap { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--site-gold-ink); white-space: nowrap; }
.dt-pillset { display: inline-flex; gap: 3px; padding: 3px; background: #f4eee0; border: 1px solid rgba(179,138,62,.28); border-radius: 999px; }
.dt-pill { border: 0; background: transparent; padding: 6px 14px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #77836f; border-radius: 999px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.dt-pill:hover { color: var(--site-forest); background: rgba(179,138,62,.14); }
.dt-pill.on { background: var(--site-forest); color: #f5efe0; box-shadow: 0 2px 8px -3px rgba(8,26,20,.4); }
.dt-pill.dt-ico { padding: 7px 13px; display: inline-flex; align-items: center; justify-content: center; }
.dt-palette { margin-top: 16px; }
.dt-palette .dt-pill { display: inline-flex; align-items: center; gap: 7px; }
.dt-sw { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-ac) 50%); border: 1px solid rgba(0,0,0,.15); flex-shrink: 0; }
.dt-actions { display: grid; grid-template-columns: 1fr 52px; gap: 10px; margin-top: 22px; }
.dt-actions .btn { justify-content: center; }
.dt-fav { width: 52px; border: 1.5px solid rgba(179,138,62,.4); border-radius: 12px; background: #fff; color: var(--site-gold-ink); font-size: 20px; cursor: pointer; }
.dt-fav.on { background: var(--site-forest); color: #f5efe0; border-color: var(--site-forest); }
.dt-hint { font-size: 12px; line-height: 1.5; color: var(--muted); }
.dt-custom-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(179,138,62,.25); }
.dt-custom-head .dt-hint { text-align: right; max-width: 26ch; }
.dt-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.dt-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dt-frow--3 { grid-template-columns: 1fr .8fr 1.2fr; }
.dt-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dt-f label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--site-gold-ink); }
.dt-f input { width: 100%; padding: 10px 12px; font-size: 13.5px; font-family: inherit; color: var(--site-forest); background: #fff; border: 1px solid rgba(179,138,62,.3); border-radius: 10px; }
.dt-f input:focus { outline: none; border-color: var(--site-gold); box-shadow: 0 0 0 3px rgba(179,138,62,.18); }
.dt-fcap { margin-top: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--site-gold-ink); }
.dt-edlink { display: block; width: 100%; margin-top: 10px; padding: 10px; font-size: 13px; font-weight: 600; text-align: center; color: var(--site-gold-ink); background: none; border: 0; border-radius: 10px; cursor: pointer; font-family: inherit; }
.dt-edlink:hover { background: rgba(179,138,62,.12); color: var(--site-forest); }
.dt-custom .form-err { margin: 10px 0 0; }

.dt-related-head { display: flex; align-items: baseline; justify-content: space-between; margin: 60px 0 20px; }
.dt-related-head a { font-size: 13px; color: var(--site-gold-ink); text-decoration: none; }
@media (max-width: 760px) {
  .dt-stage { padding: 18px 12px; border-radius: 20px; }
  .dt-stage-in { grid-template-columns: 1fr; gap: 14px; }
  .dt-railcol { flex-direction: row; align-items: center; gap: 8px; }
  .dt-rail { flex-direction: row; max-height: none; overflow-x: auto; scrollbar-width: none; padding: 2px; }
  .dt-rail::-webkit-scrollbar { display: none; }
  .dt-rail-cap { display: none; }
  .dt-thumb { width: 62px; flex-shrink: 0; }
  .dt-stage::before, .dt-stage::after { display: none; }
  .dt-stage-head .dt-hint { display: none; }
  .dt-stage .dev-phone { width: min(292px, 86vw); }
  .dt-stage .dev-web .dev-screen { height: min(52vh, 400px); }
}
@media (max-width: 560px) {
  .dt-frow { grid-template-columns: 1fr; }
  .dt-frow--3 { grid-template-columns: 1fr 1fr; }
  .dt-frow--3 .dt-f:last-child { grid-column: 1 / -1; }
  .dt-custom-head { flex-wrap: wrap; row-gap: 4px; }
  .dt-custom-head .dt-hint { text-align: left; max-width: none; }
}
.tpl-cats { margin-top: 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--site-gold-ink); }
.dt-langs .badge.on { background: var(--site-forest); color: #f5efe0; }
/* corrective: preview sizing, fs button, benefit grid, cta overlay, lock label */
#preview { width: 100%; min-width: 0; }
.dt-phonecol { width: 100%; min-width: 0; }
.dt-stage .devstage { width: 100%; padding: 8px 0; }
.dt-stage .dev-phone { width: min(360px, 100%); }
.dt-stage .dev-phone::before { display: none; }
.dt-stage .dev-web { width: 100%; }
.dt-stage .dev-web .dev-screen { aspect-ratio: auto; min-height: 0; height: clamp(320px, 52vh, 560px); }
.dt-nav { flex-wrap: wrap; justify-content: center; }
.dt-nav #fsBtn { width: auto; min-height: 44px; padding: 9px 18px; font-size: 13px; }
.dt-thumb-in .invctx { transform-origin: top left; }
.dt-thumb-in .invctx * { pointer-events: none !important; }
/* <=640 header: language, studio and menu share one 42px round tool size and surface */
@media (max-width: 640px) {
  .site-head .head-in { gap: 8px; }
  .site-head .head-right { gap: 8px; }
  .site-head .studio-name, .site-head .studio-summary > svg { display: none; }
  .site-head .studio-summary, .site-head .site-lang, .site-head #menuBtn { width: 42px; height: 42px; min-width: 42px; padding: 0; flex-shrink: 0; justify-content: center; border-radius: 50%; }
  .site-head .studio-summary, .site-head .site-lang, body.platform .site-head #menuBtn { background: #fffdf7; border: 1px solid rgba(179, 138, 62, 0.42); color: var(--site-forest); box-shadow: 0 1px 2px rgba(8, 42, 32, 0.06); }
  .site-head .studio-summary i { width: 30px; height: 30px; }
  .site-head .site-lang svg { width: 19px; height: 19px; }
  .site-head .site-lang > span { display: none; }
  .mmenu { overflow-y: auto; overscroll-behavior: contain; }
}
/* design details: a desktop browser mockup is pointless on a phone, so the mobile preview is the only view */
@media (max-width: 560px) {
  .dt-stage #viewToggle { display: none; }
}
