/* Nikahwin main site + dashboards. Dark values on :root, warm light via [data-theme="light"] (the default theme setting). Headings use --font-head. */
:root {
  --bg: #17110f; --bg2: #201816; --surface: #251c1a; --surface2: #2f2421; --line: #3d302c;
  --text: #f6eee9; --muted: #bfaea6; --accent: #d47a92; --accent2: #c9a35a; --on-accent: #17110f;
  --danger: #ff5c6c; --ok: #3ddc97; --warn: #ffc247;
  --radius: 14px; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --font-head: 'Playfair Display', Georgia, serif;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #fbf7f4; --bg2: #f4ece7; --surface: #ffffff; --surface2: #f7f0eb; --line: #eadcd4;
  --text: #2a1f24; --muted: #6e5d64; --shadow: 0 10px 30px rgba(90,42,58,.08);
  --danger: #c8102e; --ok: #0a7f4f; --warn: #9a6100;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-family: var(--font-head); font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(560px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface2); color: var(--text); font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Cards & badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-top: 0; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface2); border: 1px solid var(--line); vertical-align: middle; }
.badge-vip, .badge-premium { background: linear-gradient(90deg, #ffd34d, #ff9f1c); color: #1a1200; border: 0; }
.badge-admin { background: var(--danger); color: #fff; border: 0; }
.badge-moderator { background: #6c8cff; color: #fff; border: 0; }
.badge-ok, .badge-published, .badge-active, .badge-visible, .badge-resolved { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border-color: transparent; }
.badge-warn, .badge-pending, .badge-draft, .badge-open, .badge-reserved { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); border-color: transparent; }
.badge-danger, .badge-banned, .badge-hidden, .badge-blocked { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); border-color: transparent; }

/* How-to guide */
.howto { max-width: 860px; }
.howto-search { position: sticky; top: 0; z-index: 5; padding: 12px; margin-bottom: 12px; }
.howto-search input { margin: 0; }
.howto-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.howto-topics a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; text-decoration: none; color: var(--text); background: var(--surface); }
.howto-topics a:hover { border-color: var(--accent); }
.howto-topic { margin-bottom: 26px; scroll-margin-top: 90px; }
.howto-topic h2 { font-size: 1.25rem; margin: 0 0 10px; }
.howto details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; scroll-margin-top: 90px; transition: box-shadow .3s; }
.howto summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "▸"; color: var(--accent); transition: transform .15s; flex: none; }
.howto details[open] > summary::before { transform: rotate(90deg); }
.howto-body { padding: 0 16px 14px 36px; line-height: 1.65; overflow-wrap: anywhere; }
.howto-body h4 { margin: 14px 0 4px; font-size: .95rem; }
.howto-body ol, .howto-body ul { padding-left: 20px; margin: 8px 0; }
.howto-body li { margin-bottom: 4px; }
.howto-body .table-wrap { margin: 10px 0; }
.howto-body td:first-child { white-space: nowrap; font-weight: 600; }
.howto-body .tip { padding: 8px 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 8px 8px 0; font-size: .92rem; }
.howto-flash { box-shadow: 0 0 0 3px var(--accent); }
.howto-body th:first-child, .howto-body td:first-child { overflow-wrap: normal; }
@media (max-width: 600px) {
  .howto-body { padding: 0 12px 12px 14px; }
  .howto-body th:first-child, .howto-body td:first-child { white-space: normal; min-width: 6.8em; }
  .howto-body th, .howto-body td { padding: 8px 8px; }
}

.comment-notice { margin-bottom: 18px; border-left: 5px solid var(--accent); color: var(--text); text-decoration: none; gap: 10px; }
.comment-notice:hover { border-color: var(--accent); }

/* Anything with the hidden attribute stays hidden, even if a class gives it a display value. */
[hidden] { display: none !important; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
label .hint, .hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
code, .flash, .errors li { overflow-wrap: anywhere; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], input[type=tel], input[type=date], input[type=time], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: 15px/1.4 var(--font); }
textarea { min-height: 100px; resize: vertical; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.input-group { display: flex; align-items: stretch; margin-top: 6px; }
.input-group span { display: flex; align-items: center; padding: 0 10px; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px 0 0 10px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.input-group span:last-child { border-radius: 0 10px 10px 0; }
.input-group input { margin: 0; border-radius: 0; min-width: 0; }
.input-group input:first-child { border-radius: 10px 0 0 10px; }
.input-group input:last-child { border-radius: 0 10px 10px 0; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 40px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { left: 21px; background: var(--on-accent); }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Flash / notices */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.flash-success { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.flash-error { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.flash-info { border-color: var(--line); background: var(--surface); }
.errors { padding: 12px 16px 12px 32px; border-radius: 12px; border: 1px solid var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); margin-bottom: 16px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface2); }
tr:last-child td { border-bottom: 0; }
td .row { gap: 6px; flex-wrap: nowrap; }
td form { display: inline; margin: 0; }

/* Tabs / filters */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.active, .tabs a:hover { background: var(--surface2); color: var(--text); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar input, .toolbar select { margin: 0; width: auto; min-width: 160px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.pagination .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Stats & chart */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding: 8px 0; }
.chart .bar { flex: 1; height: var(--h); min-height: 2px; background: linear-gradient(to top, var(--accent), var(--accent2)); border-radius: 4px 4px 0 0; position: relative; }
.chart .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); opacity: 0; }
.chart .bar:hover span { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }

/* Public header/footer */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { font: 700 1.45rem/1 var(--font-head); text-decoration: none; letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
.logo-rings { color: var(--accent); flex: none; }
.logo-img { display: block; width: auto; max-width: min(220px, 50vw); object-fit: contain; }
.error-entry { white-space: pre-wrap; word-break: break-word; font: 12px/1.5 ui-monospace, Consolas, monospace; margin: 0 0 10px; max-height: 360px; overflow: auto; }
.logo-preview { padding: 14px 16px; margin-bottom: 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.logo-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.main-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.main-nav > a:not(.btn) { padding: 8px 12px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); border-radius: 8px; }
.main-nav > a:not(.btn):hover, .main-nav > a[aria-current] { color: var(--text); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: 18px; }
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-grid; margin-left: auto; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; }
  .main-nav.open { display: flex; }
}
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0; color: var(--muted); font-size: 14px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
main.page { padding: 40px 0; min-height: 60vh; }
/* Ad spots (neutral names so ad blockers do not hide the site's own banners) */
.spot { margin: 16px auto; text-align: center; max-width: 100%; overflow: hidden; }
.spot img, .spot iframe { max-width: 100%; height: auto; }
.spot-row .spot { margin: 12px auto; }
.spot .spot-link-a { display: inline-flex; align-items: center; gap: .5em; max-width: 100%; padding: .45em .9em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.spot .spot-link-a:hover { border-color: var(--accent); }
.spot-tag { font-size: .7em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Home */
.hero-home { padding: clamp(60px, 10vw, 130px) 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero-home::before { content: ''; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent2) 30%, transparent), transparent), radial-gradient(closest-side at 70% 40%, color-mix(in srgb, var(--accent) 25%, transparent), transparent); filter: blur(40px); z-index: -1; }
.hero-home h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); letter-spacing: -.02em; }
.hero-home h1 em { font-style: italic; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-home .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.rotating { transition: opacity .35s ease, transform .35s ease; }
.rot-fade.rot-out { opacity: 0; }
.rot-slide.rot-out { opacity: 0; transform: translateY(-.35em); }
.rot-type::after { content: '▍'; margin-left: .05em; animation: rot-caret 1s steps(1) infinite; color: var(--accent); }
@keyframes rot-caret { 50% { opacity: 0; } }
.claim { display: flex; max-width: 520px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; }
.claim span { padding: 0 4px 0 16px; align-self: center; color: var(--muted); font-weight: 600; white-space: nowrap; }
.claim input { border: 0; background: transparent; margin: 0; padding: 10px 4px; min-width: 0; font-weight: 600; }
.claim input:focus { outline: none; }
.claim-suffix input { padding-left: 18px; text-align: right; }
.claim-suffix span { padding: 0 12px 0 0; }
.claim:focus-within { outline: 2px solid var(--accent); }
.section { padding: 60px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { font-size: 28px; }
.tpl-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.tpl-card:hover { transform: translateY(-4px); border-color: var(--accent); color: inherit; }
.tpl-thumb { aspect-ratio: 4/3; position: relative; overflow: hidden; background: var(--bg2); }
.tpl-thumb iframe { width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; }
.tpl-meta { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tpl-meta p { margin: 0; font-size: 13px; color: var(--muted); }
.swatch { height: 100%; display: grid; place-items: center; font-size: 2rem; font-weight: 800; padding: 16px; text-align: center; }
.steps { counter-reset: s; }
.steps li { list-style: none; counter-increment: s; position: relative; padding-left: 48px; margin-bottom: 18px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose a { color: var(--accent); }

/* Auth */
.auth-card { max-width: 440px; margin: 40px auto; }
.auth-card h1 { font-size: 2rem; }

/* Dashboard layout */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-side { background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.dash-side .logo { margin: 4px 8px 18px; }
.dash-side a.nav { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.dash-side a.nav:hover { background: var(--surface); color: var(--text); }
.dash-side a.nav.active { background: var(--surface2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.dash-side .group { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 12px 4px; }
.dash-side .side-foot { margin-top: auto; padding-top: 16px; display: flex; gap: 8px; align-items: center; }
.dash-main { padding: 24px clamp(16px, 3vw, 40px); min-width: 0; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.dash-top h1 { font-size: 1.7rem; margin: 0; }
.dash-mobile-bar { display: none; }
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: fixed; inset: 0 30% 0 0; z-index: 80; transform: translateX(-105%); transition: transform .2s; height: 100%; }
  .dash-side.open { transform: none; box-shadow: var(--shadow); }
  .dash-mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 60; }
}
.page-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.page-row h3 { margin: 0; }
details.inline > summary { cursor: pointer; list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { margin-bottom: 12px; }
.comment-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.comment-item:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.serp { background: #fff; color: #202124; padding: 16px; border-radius: 12px; font-family: arial, sans-serif; }
.serp .u { color: #188038; font-size: 13px; }
.serp .t { color: #1a0dab; font-size: 19px; margin: 2px 0; }
.serp .d { color: #4d5156; font-size: 14px; }
.install-banner { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 420px; margin: auto; z-index: 90; display: none; }
.install-banner.show { display: block; }

.chk-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.chk-tags .check { font-size: 14px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag-chips a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.tag-chips a.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* WYSIWYG (wysiwyg.js), shared by the editor and admin pages */
.wy { border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); margin-top: 6px; font-weight: 400; }
.wy-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); }
.wy-bar button { min-width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; font-size: 13px; }
.wy-bar button:hover { background: var(--surface2); }
.wy-area { min-height: 140px; padding: 10px 12px; outline: none; font-size: 15px; max-height: 520px; overflow-y: auto; }
.wy-area:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.wy-area p { margin: 0 0 .6em; }

/* ---------- Starter wizard ---------- */
.wiz-progress { display: flex; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; counter-reset: wiz; }
.wiz-progress li { flex: 1; padding-top: 8px; border-top: 4px solid var(--line); font-size: .8rem; color: var(--muted); counter-increment: wiz; }
.wiz-progress li::before { content: counter(wiz) ". "; }
.wiz-progress li.on { border-color: var(--accent); color: var(--text); font-weight: 600; }
.wiz-step { border: 0; padding: 0; margin: 0 0 8px; }
.wiz-step legend { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; padding: 0; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.persona { position: relative; margin: 0; }
.persona input, .wiz-tpl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.persona span { display: grid; gap: 6px; place-items: center; min-height: 96px; padding: 12px; text-align: center; font-weight: 600; border: 2px solid var(--line); border-radius: 12px; background: var(--surface2); }
.persona span b { font-size: 1.8rem; font-weight: 400; }
.persona input:checked + span, .wiz-tpl input:checked ~ .sw { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.persona input:focus-visible + span, .wiz-tpl input:focus-visible ~ .sw { outline: 3px solid var(--accent2); outline-offset: 2px; }
.wiz-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.wiz-tpl { position: relative; display: grid; gap: 4px; margin: 0; font-size: .85rem; }
.wiz-tpl .sw { display: grid; place-items: center; height: 70px; border-radius: 10px; border: 2px solid var(--line); font-size: 1.3rem; font-weight: 700; }
.wiz-tpl.suggested .nm::after { content: " · suggested"; color: var(--accent); font-weight: 600; }
.wiz-tpl.locked .sw, .wiz-tpl.locked .nm { opacity: .5; }
.wiz-peek { position: relative; z-index: 1; font-size: .78rem; font-weight: 600; }
.wiz-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 10px; }
.wiz-nav [data-finish], .wiz-nav [data-next] { margin-left: auto; }

/* ---------- QR code ---------- */
.qr-card { display: grid; justify-items: center; }
.qr-box { background: #fff; padding: 10px; border-radius: 12px; line-height: 0; }
.qr-box svg { width: min(280px, 70vw); height: auto; }

/* ==========================================================================
   Nikahwin additions
   ========================================================================== */
.lang-switch { display: inline-grid; place-items: center; min-width: 40px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; }
.lang-switch:hover { border-color: var(--accent); }
.site-footer nav .lang-switch { margin-left: 6px; }
.grid-3 { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.upload-row { display: flex; gap: 8px; align-items: center; }
.upload-row input { flex: 1; min-width: 0; margin: 0; }
.upload-row .btn { flex: none; }
.btn-wa { background: #1f7a4d !important; color: #fff !important; border-color: #1f7a4d !important; }
.auth-ornament { font-size: 2.2rem; margin: 0 0 4px; text-align: center; }
.auth-card h1 { text-align: center; }
.auth-card > .muted { text-align: center; }

/* Homepage hero with a phone showing a sample invitation */
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-home { text-align: left; } .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero-home .lead { margin-left: 0; } .hero-home .claim { margin-left: 0; } }
.hero-phone { display: grid; place-items: center; }
.phone { width: min(280px, 78vw); aspect-ratio: 9 / 18.5; padding: 12px; border-radius: 42px; background: #1d1517; box-shadow: 0 30px 60px -20px rgba(90, 42, 58, .45), inset 0 0 0 2px #3a2c30; }
.phone-screen { height: 100%; border-radius: 32px; overflow: hidden; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 26px 18px; text-align: center;
  background: linear-gradient(170deg, #fdf3f4, #f6e6ea); color: #4a2531; position: relative; }
.phone-screen::before { content: ""; position: absolute; inset: 12px; border: 1px solid #d9a9b6; border-radius: 120px 120px 14px 14px; }
.ph-small { margin: 0; font-size: .62rem; letter-spacing: .3em; }
.ph-names { margin: 0; font: 400 2.1rem/1.1 'Great Vibes', 'Playfair Display', cursive; }
.ph-names span { color: #a84a63; }
.ph-date { margin: 0; font-size: .72rem; }
.ph-orn { color: #a84a63; }
.ph-count { display: flex; gap: 6px; }
.ph-count span { display: grid; min-width: 44px; padding: 6px 4px; border-radius: 8px; background: #fff; font-size: .55rem; text-transform: uppercase; letter-spacing: .08em; }
.ph-count b { font-size: 1rem; letter-spacing: 0; }
.ph-btn { margin: 6px 0 0; padding: 6px 18px; border-radius: 999px; background: #a84a63; color: #fff; font-size: .72rem; font-weight: 700; }
.ph-dock { position: absolute; bottom: 18px; display: flex; gap: 10px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); font-size: .85rem; }

/* Template thumbnails: a small invitation card */
.tpl-invite { width: 78%; padding: 18px 10px; border: 1px solid; border-radius: 80px 80px 8px 8px; display: grid; justify-items: center; gap: 6px; }
.tpl-small { font: 600 .55rem/1 system-ui, sans-serif; letter-spacing: .28em; opacity: .8; }
.tpl-names { font-size: 1.7rem; font-weight: 400; line-height: 1.1; }
.tpl-line { width: 40px; height: 1px; }
.tpl-btn { padding: 4px 14px; border-radius: 99px; font: 700 .65rem system-ui, sans-serif; letter-spacing: .1em; }

/* Steps, pricing, FAQ */
.narrow-block { max-width: 860px; }
.steps-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.pricing { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); max-width: 820px; margin: 28px auto 0; }
.price-card { display: grid; align-content: start; gap: 10px; }
.price-card h3 { margin: 0; font-size: 1.5rem; }
.price-card .btn { justify-self: start; }
.price { margin: 0; font: 700 2.2rem/1 var(--font-head); }
.price small { font: 500 .85rem var(--font); color: var(--muted); }
.price-best { border: 2px solid var(--accent); position: relative; }
.price-best .badge-vip { justify-self: start; }
.ticks { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.ticks li.muted::before { content: "·"; color: var(--muted); }
.faq { display: grid; gap: 10px; margin-top: 24px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style-position: inside; }
.faq details p { padding: 0 20px 16px; margin: 0; }

/* Dashboard bits */
.wiz-sub { font-size: 1rem; margin: 18px 0 8px; font-family: var(--font); }
.wa-preview { display: grid; overflow: hidden; border-radius: 10px; background: #e7f6e4; color: #111; border: 1px solid #cfe6cb; }
.wa-preview img { width: 100%; aspect-ratio: 1.91; object-fit: cover; }
.wa-text { display: grid; gap: 2px; padding: 10px 12px; font-size: .88rem; }
.wa-text span { color: #444; }
.wa-text small { color: #667; }
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.help-toc a { padding: 6px 12px; border-radius: 999px; background: var(--surface2); text-decoration: none; font-size: .9rem; }
.help h2 { font-size: 1.3rem; }
.help ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.guest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guest-list li { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.guest-url { word-break: break-all; color: var(--muted); }
.rsvp-table td { vertical-align: top; }
/* Admin → Translations */
.tr-list { display: grid; gap: 0; }
.tr-row { display: grid; gap: 8px 18px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); padding: 14px 0; border-bottom: 1px solid var(--line); }
.tr-row:last-child { border-bottom: 0; }
.tr-edited .tr-ms { border-left: 3px solid var(--accent); padding-left: 10px; }
.tr-en div { white-space: pre-line; }
.tr-ms input, .tr-ms textarea { margin: 4px 0 0; }