/* ใจตรงกัน v1.1 — premium theme
   Navy ink on ivory paper, champagne-gold hairlines, wine only for hearts.
   Signature: arched portrait frames (like a doorway) wherever a person appears. */
:root {
  --ivory: #FAF7F1;
  --surface: #FFFFFF;
  --line: #E7E0D3;
  --line-2: #F1ECE2;
  --ink: #13213C;
  --ink-2: #3E4A66;
  --muted: #6E7487;
  --navy-2: #1E3157;
  --navy-3: #2A4170;
  --gold: #B08D57;
  --gold-ink: #7D5F31;
  --gold-soft: #E9DFCB;
  --gold-wash: #F6F0E4;
  --wine: #8E2C48;
  --wine-wash: #F6E7EB;
  --sage: #3F7F70;
  --sage-wash: #E6F0EC;
  --danger: #A8322A;
  --danger-wash: #F9E9E7;
  --r-ctl: 10px;
  --r-panel: 16px;
  --arch: 50% 50% 14px 14px / 38% 38% 14px 14px;
  --shadow: 0 1px 2px rgba(19, 33, 60, .05), 0 12px 32px -18px rgba(19, 33, 60, .28);
  --f-display: 'Trirong', 'Noto Serif Thai', Georgia, serif;
  --f-body: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 16px/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh;
}
img, video { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 4px; }
a:hover { color: var(--gold-ink); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.35; margin: 0 0 .5em; color: var(--ink); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { font-size: .88em; background: var(--line-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
::selection { background: var(--gold-soft); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.break { word-break: break-word; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.ic { flex: none; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 28px; padding-bottom: 104px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.narrow-text { max-width: 720px; margin: 0 auto; }
.display { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.25; }
.display-sm { font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.3; }
.section-title { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 56px 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--surface); --fg: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: var(--r-ctl); border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font: 500 .96rem/1.2 var(--f-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { color: var(--fg); border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary, .btn-ink { --bg: var(--ink); --fg: #fff; --bd: var(--ink); }
.btn-primary:hover, .btn-ink:hover { --bg: var(--navy-2); --bd: var(--navy-2); color: #fff; }
.btn-gold { --bg: linear-gradient(180deg, #C9A86F, #A9844C); --fg: #fff; --bd: #A9844C; background: var(--bg); text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn-gold:hover { color: #fff; filter: brightness(1.05); border-color: #A9844C; }
.btn-ghost { --bg: transparent; }
.btn-danger { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
.btn-danger:hover { color: #fff; filter: brightness(.92); border-color: var(--danger); }
.btn-danger-ghost { --bg: transparent; --fg: var(--danger); --bd: #E6C3BF; }
.btn-danger-ghost:hover { color: var(--danger); --bg: var(--danger-wash); border-color: var(--danger); }
.btn-call { --bg: var(--ink); --fg: #fff; --bd: var(--ink); }
.btn-call .ic { color: #D9BE8C; }
.btn-call:hover { color: #fff; --bg: var(--navy-2); }
.btn-call small { font-weight: 400; opacity: .8; }
.btn-line { --bg: #06C755; --fg: #fff; --bd: #06C755; }
.btn-line:hover { color: #fff; border-color: #06C755; }
.btn-light { --bg: var(--ivory); --fg: var(--ink); --bd: var(--ivory); }
.btn-outline-light { --bg: transparent; --fg: #fff; --bd: rgba(233, 223, 203, .45); }
.btn-outline-light:hover { color: #fff; border-color: var(--gold-soft); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: .8rem; border-radius: 8px; }
.btn-lg { min-height: 54px; padding: 12px 30px; font-size: 1.03rem; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.link-arrow { font-weight: 500; text-decoration: underline; text-decoration-color: var(--gold); }
.iconbtn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.iconbtn:hover { background: var(--line-2); color: var(--ink); }
.iconbtn-call { color: var(--gold-ink); }
.round {
  display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid rgba(233, 223, 203, .25); background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; backdrop-filter: blur(8px);
}
.round[aria-pressed="true"] { background: var(--ivory); color: var(--ink); }
.round-danger { background: #B8322A; border-color: #B8322A; }
.round-ok { background: var(--sage); border-color: var(--sage); color: #fff; }

/* ---------- Top bar & nav ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(250, 247, 241, .94); backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid var(--gold-soft); }
.topbar-in { display: flex; align-items: center; gap: 14px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font: 500 1.2rem/1.3 var(--f-display); }
.brand img { border-radius: 9px; flex: none; }
.brand:hover { color: var(--ink); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mainnav { display: none; gap: 2px; margin-left: 16px; }
.mainnav a { position: relative; display: inline-flex; gap: 7px; align-items: center; padding: 8px 14px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.mainnav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -12px; height: 2px; background: transparent; }
.mainnav a:hover { color: var(--ink); }
.mainnav a[aria-current="page"] { color: var(--ink); }
.mainnav a[aria-current="page"]::after { background: var(--gold); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.topbar-actions form { margin: 0; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px; background: var(--gold-wash); border: 1px solid var(--gold-soft); color: var(--gold-ink); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.credit-pill .ic { color: var(--gold); }
.credit-pill:hover { color: var(--gold-ink); border-color: var(--gold); }
.dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--wine); color: #fff; font: 600 10px/15px var(--f-body); text-align: center; border: 1px solid var(--ivory); box-sizing: border-box; }
.mainnav .dot { position: static; margin-left: 2px; border: 0; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ivory); box-shadow: 0 0 0 1px var(--gold); }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); padding: 16px 8px 8px; display: grid; gap: 2px; }
.usermenu-pop > strong { padding: 0 12px; font: 500 1.08rem var(--f-display); }
.usermenu-pop > span { padding: 0 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.usermenu-pop a, .usermenu-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; width: 100%; font: inherit; cursor: pointer; text-align: left; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--ivory); color: var(--ink); }
.usermenu-pop .ic { color: var(--gold-ink); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--gold-soft); padding-bottom: var(--safe-b);
}
.tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 9px 0 7px; color: var(--muted); text-decoration: none; font-size: .72rem; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabbar a[aria-current="page"]::before { content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--gold); }
.tabbar a[aria-current="page"] .ic { color: var(--gold-ink); }
.tabbar .dot { top: 4px; right: calc(50% - 22px); }

.footer { background: var(--ink); color: rgba(250, 247, 241, .8); padding: 36px 0 calc(92px + var(--safe-b)); }
.footer a, .footer .linklike { color: rgba(250, 247, 241, .85); text-decoration: none; }
.footer a:hover, .footer .linklike:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold); }
.footer .muted { color: rgba(250, 247, 241, .55); }
.footer-in { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: flex-start; padding-bottom: 20px; margin-bottom: 16px; border-bottom: 1px solid rgba(233, 223, 203, .18); }
.brand-foot { font: 500 1.25rem var(--f-display); color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Alerts & toasts ---------- */
.alert { padding: 12px 16px; border-radius: var(--r-ctl); margin: 0 0 18px; border: 1px solid; border-left-width: 3px; }
.alert-success { background: var(--sage-wash); border-color: #BFD8CF; border-left-color: var(--sage); color: #22564B; }
.alert-error { background: var(--danger-wash); border-color: #EBC7C2; border-left-color: var(--danger); color: #7D241D; }
.alert-info { background: var(--gold-wash); border-color: var(--gold-soft); border-left-color: var(--gold); color: var(--ink); }
.toasts { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 13px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); border-left: 3px solid var(--gold); animation: toastIn .2s ease-out; }
.toast-error { border-left-color: #E07A70; }
.toast-success { border-left-color: #7FC2B1; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Panels & forms ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px; margin: 0 0 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel > h2:first-child, .panel > summary { margin-top: 0; }
.form { display: grid; gap: 16px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: .93rem; color: var(--ink-2); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: #FDFCF9; color: var(--ink); font: 400 1rem var(--f-body); transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { min-height: 100px; resize: vertical; line-height: 1.65; }
input:hover, select:hover, textarea:hover { border-color: #D6CBB6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(176, 141, 87, .14); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); padding: 0; margin: 0; }
input[type=color] { padding: 4px; width: 80px; }
input[type=file] { padding: 10px; background: var(--ivory); }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 400; }
.help { color: var(--muted); font-size: .85rem; margin: -8px 0 4px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--ink); }
.check.strong { font-weight: 600; }
.check-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 400; cursor: pointer; color: var(--ink); }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; transition: background .2s; border: 0; padding: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(18px); }
.seg, .form .seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg legend { font-weight: 500; font-size: .93rem; color: var(--ink-2); margin-bottom: 6px; width: 100%; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; min-width: 76px; text-align: center; padding: 10px 18px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: #FDFCF9; cursor: pointer; font-weight: 500; color: var(--ink); }
.seg span:hover { border-color: var(--gold); }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.otp-input { font: 500 2.1rem/1 var(--f-display); letter-spacing: .5em; text-align: center; padding-left: .5em; }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.row-between { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form label { flex: 1 1 220px; }
.code-box { font: 600 1.3rem var(--f-display); letter-spacing: .08em; background: var(--gold-wash); border: 1px dashed var(--gold); padding: 12px 16px; border-radius: var(--r-ctl); cursor: copy; display: inline-block; }
.steps { padding-left: 1.3em; display: grid; gap: 6px; }
.checklist { list-style: none; padding: 0; display: grid; gap: 6px; margin: 0; }
.checklist .ok { color: var(--sage); }
.checklist .bad { color: var(--danger); font-weight: 600; }
.danger-zone { border-color: #EBC7C2; }
.center-left { margin: -8px 0 20px; }

/* ---------- Auth ---------- */
.auth-layout { display: grid; gap: 24px; align-items: start; }
.auth-aside { display: none; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 22px; box-shadow: var(--shadow); }
.auth-card.narrow { max-width: 460px; margin: 16px auto; }
.auth-card > h1 { margin-bottom: 6px; }
.auth-card > h1 + p { margin-bottom: 22px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 14px; margin: 24px 0 0; }
.ticks li { padding-left: 32px; position: relative; z-index: 1; color: rgba(250, 247, 241, .88); }
.ticks li::before { content: ''; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--gold); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9BE8C' stroke-width='2.6'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- Page head, tabs, filters ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.tabs { display: flex; gap: 0; margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); white-space: nowrap; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; margin: 0 0 24px; }
.filters label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.filters input, .filters select { min-height: 40px; padding: 6px 10px; width: auto; }
.filters input[type=number] { width: 72px; }
.chip-check { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #FDFCF9; cursor: pointer; font-weight: 500; }
a.chip-check { color: var(--ink); text-decoration: none; }
a.chip-check:hover { border-color: var(--gold); color: var(--ink); }
.meter { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: -8px 0 24px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #D9BE8C); border-radius: 3px; }
.empty { text-align: center; padding: 60px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.empty::before { content: ''; display: block; width: 56px; height: 70px; margin: 0 auto 18px; border: 1px solid var(--gold); border-radius: var(--arch); background: var(--gold-wash); }
.empty .display-sm { margin-bottom: 8px; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 28px 0; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.pager span { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- People cards: arched portraits ---------- */
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
.person { position: relative; }
.person-photo { display: block; position: relative; aspect-ratio: 4 / 5; border-radius: var(--arch); overflow: hidden; background: var(--line-2); box-shadow: 0 0 0 1px var(--gold-soft); }
.person-photo::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--arch); pointer-events: none; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.person:hover .person-photo img { transform: scale(1.03); }
.person-photo img.blur { filter: blur(14px) saturate(.6); transform: scale(1.12); }
.online-dot { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; background: rgba(19, 33, 60, .72); color: #fff; font-size: .72rem; font-weight: 500; padding: 3px 10px 3px 8px; border-radius: 999px; backdrop-filter: blur(6px); white-space: nowrap; z-index: 1; }
.online-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7FD1B9; }
.person-meta { padding: 12px 52px 0 2px; }
.person-meta h2 { font-size: 1.12rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta h2 a { color: var(--ink); text-decoration: none; }
.person-meta .age { color: var(--gold-ink); font-weight: 400; }
.person-meta p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.like-btn {
  position: absolute; right: 0; bottom: 0;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--gold-soft); background: var(--surface); color: var(--wine); cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(19, 33, 60, .45); transition: transform .15s, background .15s; z-index: 2;
}
.like-btn:hover { transform: scale(1.07); }
.like-btn.is-liked, .like-btn[aria-pressed="true"] { background: var(--wine); color: #fff; border-color: var(--wine); }
.like-btn.is-liked .ic, .like-btn[aria-pressed="true"] .ic { fill: currentColor; }
.person-actions { position: absolute; right: -4px; bottom: -2px; display: flex; gap: 0; }

/* ---------- Profile ---------- */
.profile { display: grid; gap: 26px; }
.profile-gallery { position: relative; border-radius: var(--arch); overflow: hidden; background: var(--line-2); aspect-ratio: 4 / 5; cursor: pointer; box-shadow: 0 0 0 1px var(--gold-soft), var(--shadow); max-width: 520px; width: 100%; margin: 0 auto; }
.profile-gallery::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--arch); pointer-events: none; }
.profile-gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 1; }
.gallery-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.gallery-dots i.on { background: #fff; }
.profile-body h1 { margin-bottom: 4px; }
.profile-body .age { font-weight: 400; color: var(--gold-ink); }
.on { color: var(--sage); font-weight: 600; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0; padding: 18px 0; border-top: 1px solid var(--gold-soft); border-bottom: 1px solid var(--gold-soft); }
.profile-actions [data-like] .ic { color: inherit; }
.profile-actions [data-like][aria-pressed="true"] { color: var(--wine); border-color: var(--wine); }
.profile-actions [data-like][aria-pressed="true"] .ic { fill: currentColor; }
.facts { display: grid; gap: 0; margin: 18px 0; }
.facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.bio { background: var(--surface); border-radius: var(--r-panel); padding: 18px 20px; border: 1px solid var(--line); margin-bottom: 18px; font-size: 1.02rem; }
.chips { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--gold-soft); font-size: .9rem; text-decoration: none; color: var(--ink); }
.chips a { color: var(--ink); text-decoration: none; }
.chips li:has(a):hover { border-color: var(--gold); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.safety-box { margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px 18px; }
.safety-box summary { cursor: pointer; display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.safety-box form { margin-top: 12px; }

/* ---------- My photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.photo-tile { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--line-2); aspect-ratio: 4 / 5; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile.is-primary { border-radius: var(--arch); box-shadow: 0 0 0 2px var(--gold); }
.photo-tile figcaption { position: absolute; inset: auto 0 0 0; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: linear-gradient(transparent, rgba(19, 33, 60, .8)); }
.photo-tile figcaption form { margin: 0; }
.photo-tile figcaption a { color: #fff; }
.photo-tile figcaption .btn { --bg: rgba(255, 255, 255, .94); }
.tag { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .72rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.tag-wait { background: var(--gold); }
.photo-add { margin: 0; }
.photo-add label { aspect-ratio: 4 / 5; border: 1px dashed var(--gold); border-radius: 14px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--gold-ink); cursor: pointer; background: var(--gold-wash); }
.photo-add label:hover { background: #F1E7D5; }
.photo-add input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* ---------- Lists & conversations ---------- */
.list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.list-item + .list-item { border-top: 1px solid var(--line-2); }
.list-item > a { display: grid; gap: 2px; padding: 15px 18px; color: var(--ink); text-decoration: none; }
.list-item > a:hover { background: var(--ivory); }
.list-item.is-unread { background: #FFFCF6; }
.list-item.is-unread strong::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; }
.convo { grid-template-columns: auto 1fr auto !important; align-items: center; gap: 14px !important; }
.convo strong { font: 500 1.05rem var(--f-display); }
.avatar-wrap { position: relative; }
.avatar-wrap img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--gold-soft); }
.presence { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--sage); border: 2px solid #fff; }
.convo-text { display: grid; min-width: 0; }
.convo-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--wine); color: #fff; font-size: .75rem; font-weight: 600; display: inline-grid; place-items: center; }

/* ---------- Chat ---------- */
.chat-page { padding: 0; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 66px - 64px - var(--safe-b)); max-width: 820px; margin: 0 auto; background: var(--surface); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--gold-soft); }
.chat-who { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; flex: 1; }
.chat-who img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--gold-soft); }
.chat-who span { display: grid; line-height: 1.3; min-width: 0; }
.chat-who strong { font: 500 1.08rem var(--f-display); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--ivory); overscroll-behavior: contain; }
.chat-hint { text-align: center; font-size: .85rem; max-width: 440px; margin: 0 auto 10px; padding: 10px 14px; border: 1px solid var(--gold-soft); border-radius: 12px; background: var(--gold-wash); color: var(--ink-2); }
.chat-day { display: flex; align-items: center; gap: 12px; font-size: .75rem; color: var(--muted); margin: 12px 0 6px; }
.chat-day::before, .chat-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bubble { max-width: 78%; padding: 9px 14px 6px; border-radius: 18px; position: relative; line-height: 1.55; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: .68rem; opacity: .65; text-align: right; margin-top: 2px; }
.bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.mine.read time::after { content: ' · อ่านแล้ว'; color: #D9BE8C; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form textarea { min-height: 48px; max-height: 140px; resize: none; border-radius: 24px; padding: 12px 18px; }
.chat-form .btn { border-radius: 24px; }

/* ---------- Video call ---------- */
body.is-call { background: #0B1426; overflow: hidden; }
.call-page { padding: 0; }
.call { position: fixed; inset: 0; background: radial-gradient(120% 80% at 50% 0%, #24365A 0%, #0B1426 70%); color: #fff; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.call-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; }
.call-placeholder img { width: 132px; height: 165px; border-radius: var(--arch); object-fit: cover; box-shadow: 0 0 0 1px var(--gold), 0 0 0 8px rgba(176, 141, 87, .12); animation: pulse 2.2s ease-in-out infinite; }
.call-placeholder h1 { margin: 14px 0 0; font-size: 1.7rem; color: #fff; }
.muted-light { color: rgba(250, 247, 241, .7); }
@keyframes pulse { 50% { box-shadow: 0 0 0 1px var(--gold), 0 0 0 18px rgba(176, 141, 87, .06); } }
.call-local { position: absolute; right: 14px; top: calc(72px + env(safe-area-inset-top, 0px)); width: 104px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; border: 1px solid rgba(233, 223, 203, .6); background: #000; transform: scaleX(-1); z-index: 3; }
.call-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 14px; display: flex; justify-content: space-between; gap: 8px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); z-index: 2; }
.call-timer, .call-meter { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(11, 20, 38, .55); border: 1px solid rgba(233, 223, 203, .2); font-variant-numeric: tabular-nums; font-weight: 600; }
.call-meter .ic { color: #D9BE8C; }
.call-meter-free { font-weight: 400; font-size: .85rem; }
.call-low { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); background: var(--gold); color: #fff; padding: 8px 16px; border-radius: 999px; z-index: 4; font-weight: 600; }
.call-low a { color: #fff; }
.call-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 16px calc(28px + var(--safe-b)); display: grid; justify-items: center; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); z-index: 2; }
.call-buttons, .ring-actions { display: flex; gap: 18px; justify-content: center; }
.ring-actions .round { width: 70px; height: 70px; }
.call-end { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; background: rgba(11, 20, 38, .94); z-index: 10; padding: 24px; }
.call-end h2 { color: #fff; font-size: 1.6rem; }

/* Sheets */
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(11, 20, 38, .55); display: grid; align-items: end; justify-items: center; padding: 16px; }
.sheet-card { width: min(100%, 420px); background: var(--surface); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); margin-bottom: var(--safe-b); border-top: 3px solid var(--gold); }
.ring-card { text-align: center; display: grid; justify-items: center; gap: 4px; }
.ring-card img { width: 96px; height: 120px; border-radius: var(--arch); object-fit: cover; box-shadow: 0 0 0 1px var(--gold); }
.ring-card .ring-actions { margin-top: 16px; }

/* ---------- Credits ---------- */
.balance-card { display: grid; justify-items: end; background: var(--ink); color: #fff; border-radius: var(--r-panel); padding: 12px 20px; min-width: 180px; }
.balance-card .muted { color: rgba(250, 247, 241, .65); }
.balance-card strong { font: 500 2.1rem/1.15 var(--f-display); color: #E7D3AE; font-variant-numeric: tabular-nums; }
.pkg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pkg { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px 18px 18px; display: grid; gap: 4px; align-content: start; }
.pkg.is-featured { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash), var(--shadow); }
.pkg h3 { margin: 0; font: 600 .95rem var(--f-body); color: var(--ink-2); }
.pkg-badge { position: absolute; top: -12px; left: 16px; background: var(--ink); color: #E7D3AE; font-size: .75rem; font-weight: 500; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--gold); }
.pkg-credits { font: 500 2.1rem/1.15 var(--f-display); margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.pkg-credits small { font-size: .9rem; color: var(--muted); font-family: var(--f-body); font-weight: 400; }
.pkg-price { font-weight: 600; font-size: 1.15rem; margin: 8px 0 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.pkg-mem .pkg-credits { color: var(--gold-ink); }
.pay { border-color: var(--gold); }
.pay-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pay-grid { display: grid; gap: 24px; }
.pay-qr { text-align: center; display: grid; justify-items: center; }
.qr { padding: 12px; background: #fff; border: 1px solid var(--gold-soft); border-radius: 14px; }
.qr img, .qr canvas { width: 220px; height: 220px; }
.pay-amount { font: 500 1.9rem var(--f-display); margin: 10px 0 0; }
.bank-info { background: var(--ivory); border-radius: var(--r-ctl); padding: 12px 16px; text-align: left; font-size: .92rem; width: 100%; }

/* ---------- Tables & statuses ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
td:first-child { white-space: nowrap; }
th { font-weight: 600; color: var(--ink-2); background: var(--ivory); white-space: nowrap; font-size: .84rem; }
tbody tr:hover { background: #FDFBF7; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--danger); }
.pos { color: var(--sage); }
.table-sm th, .table-sm td { padding: 7px 10px; font-size: .84rem; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.status-active, .status-approved, .status-ended { background: var(--sage-wash); color: #22564B; }
.status-pending, .status-ringing, .status-unverified { background: var(--gold-wash); color: var(--gold-ink); }
.status-suspended, .status-rejected, .status-declined, .status-missed { background: var(--danger-wash); color: #7D241D; }
.status-open { background: var(--wine-wash); color: var(--wine); }
.status-role { background: var(--ink); color: #E7D3AE; }
.actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.actions form { margin: 0; display: inline-flex; gap: 4px; }

/* ---------- Home ---------- */
.home { padding: 0; }
.hero { background: var(--ink); color: #fff; overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 85% 30%, rgba(176, 141, 87, .22), transparent 70%), radial-gradient(50% 60% at 0% 100%, rgba(42, 65, 112, .8), transparent 70%); pointer-events: none; }
.hero-in { display: grid; gap: 44px; padding-top: 52px; padding-bottom: 60px; position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 12px; color: #D9BE8C; font-size: .95rem; margin-bottom: 16px; }
.hero-kicker::before { content: ''; width: 36px; height: 1px; background: var(--gold); }
.hero-title { font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.22; margin: 0 0 20px; font-weight: 500; color: #fff; }
.hero-lead { font-size: 1.08rem; color: rgba(250, 247, 241, .78); max-width: 33em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.hero-note { color: rgba(250, 247, 241, .55); font-size: .9rem; margin: 0; }
.hero-visual { position: relative; justify-self: center; width: min(440px, 88vw); padding-bottom: 54px; }
.arch-pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.arch { margin: 0; position: relative; }
.arch-b { margin-top: 40px; }
.arch .sil { display: block; aspect-ratio: 3 / 4.2; border-radius: var(--arch); position: relative; overflow: hidden; box-shadow: 0 0 0 1px rgba(233, 223, 203, .55), 0 24px 50px -24px rgba(0, 0, 0, .7); }
.arch .sil::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--arch); }
.arch .sil { display: grid; place-items: center; }
.arch .sil i { font: 400 clamp(4.5rem, 14vw, 7.5rem)/1 var(--f-display); font-style: normal; position: relative; z-index: 1; margin-top: 8%; }
.arch-a .sil { background: radial-gradient(90% 60% at 50% 20%, #FFFDF8, transparent 70%), linear-gradient(170deg, #F1E8D8 0%, #D9C29A 100%); }
.arch-a .sil i { color: var(--ink); }
.arch-b .sil { background: radial-gradient(90% 60% at 50% 20%, rgba(176, 141, 87, .35), transparent 70%), linear-gradient(170deg, #2A4170 0%, #13213C 100%); }
.arch-b .sil i { color: #E7D3AE; }
.arch figcaption { display: grid; margin-top: 10px; line-height: 1.35; }
.arch figcaption b { font: 500 1.05rem var(--f-display); color: #fff; }
.arch figcaption span { font-size: .82rem; color: rgba(250, 247, 241, .6); }
.arch-ring { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #D9BE8C; border: 1px solid var(--gold); box-shadow: 0 0 0 6px rgba(19, 33, 60, .6); }
.arch-ring .ic { fill: currentColor; }
.match-pill { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; background: var(--ivory); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-size: .9rem; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); }
.match-pill b { color: var(--gold-ink); font-weight: 600; }
.match-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(63, 127, 112, .18); }
@media (prefers-reduced-motion: no-preference) {
  .arch, .match-pill { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
  .arch-b { animation-delay: .12s; }
  .match-pill { animation-delay: .45s; }
  @keyframes rise { from { opacity: 0; translate: 0 18px; } }
}
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-in { list-style: none; margin: 0 auto; display: grid; gap: 18px; padding-top: 26px; padding-bottom: 26px; }
.trust-in li { display: flex; gap: 14px; align-items: flex-start; }
.trust-in .ic { color: var(--gold); margin-top: 3px; }
.trust-in span { display: grid; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.trust-in b { color: var(--ink); font-weight: 600; font-size: 1rem; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: s; border-top: 1px solid var(--gold-soft); }
.how-steps li { counter-increment: s; padding: 22px 0 20px 64px; position: relative; border-bottom: 1px solid var(--gold-soft); }
.how-steps li::before { content: counter(s, thai); position: absolute; left: 4px; top: 14px; font: 500 2.2rem/1 var(--f-display); color: var(--gold); }
.how-steps h3 { margin-bottom: 4px; }
.how-steps p { margin: 0; color: var(--ink-2); }
.pledge { margin-top: 64px; }
.pledge-in { display: grid; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px 24px; }
.pledge-title { font-size: clamp(1.45rem, 3.2vw, 2rem); line-height: 1.4; margin: 0; }
.pledge-body p { color: var(--ink-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 500 1.08rem/1.5 var(--f-display); padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.5rem/1 var(--f-body); color: var(--gold); flex: none; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--ink-2); max-width: 62em; padding-bottom: 8px; }
.keywords { margin-bottom: 56px; }
.cta-band { background: var(--ink); color: #fff; position: relative; overflow: hidden; border-bottom: 1px solid rgba(233, 223, 203, .18); }
.cta-in { display: grid; gap: 18px; padding-top: 48px; padding-bottom: 48px; }
.cta-title { font: 500 clamp(1.5rem, 3.4vw, 2.1rem)/1.35 var(--f-display); margin: 0; color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Landing / prose */
.landing { padding: 8px 0 44px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.lead { font-size: 1.14rem; color: var(--ink-2); }
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 1.7em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold); }
.landing-cta { margin: 36px 0; padding: 26px; background: var(--surface); border: 1px solid var(--gold-soft); border-radius: var(--r-panel); }

/* ---------- Admin ---------- */
body.admin { background: #F5F2EC; }
.admin-shell { display: block; }
.admin-side { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--ink); color: #fff; padding: 16px 12px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; z-index: 60; display: flex; flex-direction: column; }
body.side-open .admin-side { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
.brand-admin { color: #fff; margin: 4px 8px 22px; }
.brand-admin:hover { color: #fff; }
.admin-side nav { display: grid; gap: 2px; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: rgba(250, 247, 241, .72); text-decoration: none; font-size: .93rem; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-side nav a[aria-current="page"] { background: rgba(176, 141, 87, .18); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.admin-side nav a[aria-current="page"] .ic { color: #D9BE8C; }
.admin-side nav .count { margin-left: auto; }
.admin-side-foot { margin-top: auto; padding: 16px 12px 4px; display: grid; gap: 4px; color: rgba(250, 247, 241, .55); }
.admin-side-foot a { color: #fff; }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(245, 242, 236, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gold-soft); }
.admin-top h1 { font-size: 1.35rem; margin: 0; }
.admin-content { padding: 22px 16px 60px; max-width: 1400px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 15px 17px; color: var(--ink); text-decoration: none; }
a.kpi:hover { border-color: var(--gold); color: var(--ink); }
.kpi-label { font-size: .82rem; color: var(--muted); }
.kpi-value { font: 500 1.6rem/1.25 var(--f-display); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--ink-2); }
.admin-grid { display: grid; gap: 16px; }
.admin-grid > .panel { margin: 0; min-width: 0; }
.chart-box { position: relative; width: 100%; }
.todo { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.todo a { background: var(--gold-wash); border: 1px solid var(--gold-soft); color: var(--gold-ink); padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.todo b { background: #fff; padding: 0 8px; border-radius: 999px; margin-left: 4px; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mini-list li { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.mini-list small { margin-left: auto; }
.user-cell { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.user-cell img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; }
.photo-strip img { width: 90px; height: 112px; object-fit: cover; border-radius: 10px; }
.photo-strip img.is-wait { outline: 3px solid var(--gold); }
.stack { display: grid; gap: 16px; align-content: start; }
.stack > .panel { margin: 0; }
.slip-list { display: grid; gap: 14px; }
.slip { display: grid; gap: 16px; margin: 0; }
.slip-img img { width: 100%; max-height: 360px; object-fit: contain; background: var(--ivory); border-radius: 10px; }
.slip-body h2 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.slip-body p { margin: 0 0 6px; }
.slip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.slip-actions input { flex: 1 1 200px; min-height: 40px; }
.report blockquote { margin: 8px 0; padding: 10px 14px; background: var(--ivory); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; }
.support-admin { display: grid; gap: 16px; }
.thread-list { max-height: 70vh; overflow-y: auto; }
.thread { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.thread img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.thread span { display: grid; min-width: 0; }
.thread small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread.is-active, .thread:hover { background: var(--ivory); }
.chat-admin { height: 70vh; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; max-width: none; }
.pad { padding: 16px; }
.serp { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: Arial, sans-serif; }
.serp-url { font-size: .8rem; color: #202124; }
.serp-title { color: #1a0dab; font-size: 1.15rem; }
.serp-desc { color: #4d5156; font-size: .88rem; }
.inline-details { display: inline-block; }
.inline-details summary { list-style: none; }
.inline-details[open] form { margin-top: 6px; }
.log { margin: 0 0 8px; padding: 12px 16px; }
.log summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.log-msg { flex: 1 1 300px; overflow-wrap: anywhere; }
.trace { background: var(--ink); color: #EDE6D8; padding: 12px; border-radius: 10px; font-size: .78rem; white-space: pre-wrap; overflow-x: auto; max-height: 360px; }
.admin-photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.install .panel { margin-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 420px) {
  .brand { font-size: 1.02rem; }
  .brand img { width: 30px; height: 30px; }
  .credit-pill { padding: 5px 10px 5px 7px; font-size: .9rem; }
  .topbar-actions { gap: 2px; }
  .hero-cta .btn { width: 100%; }
}
@media (min-width: 560px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: 1 / -1; }
  .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 18px; }
  .pkg-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slip { grid-template-columns: 220px 1fr; }
  .call-local { width: 150px; }
  .trust-in { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .cta-in { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 860px) {
  .mainnav { display: flex; }
  .tabbar { display: none; }
  .footer { padding-bottom: 32px; }
  .chat { height: calc(100dvh - 66px - 48px); margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; box-shadow: var(--shadow); }
  .people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 48px; }
  .profile-gallery { position: sticky; top: 92px; }
  .auth-layout { grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 28px; }
  .auth-aside { display: block; position: sticky; top: 104px; padding: 40px 36px; background: var(--ink); color: #fff; border-radius: 22px; overflow: hidden; }
  .auth-aside::after { content: ''; position: absolute; right: -90px; bottom: -170px; width: 220px; height: 280px; border: 1px solid rgba(176, 141, 87, .45); border-radius: var(--arch); }
  .auth-aside .display-sm { font-size: 2.1rem; color: #fff; }
  .pay-grid { grid-template-columns: 300px 1fr; }
  .hero-in { grid-template-columns: 1.1fr .9fr; align-items: center; padding-top: 84px; padding-bottom: 92px; }
  .how-steps { grid-template-columns: repeat(4, 1fr); border-top: 0; gap: 28px; }
  .how-steps li { padding: 0 0 0; border-bottom: 0; border-top: 1px solid var(--gold); padding-top: 64px; }
  .how-steps li::before { top: 16px; left: 0; }
  .pledge-in { grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toasts { bottom: 24px; }
  .support-admin { grid-template-columns: 300px 1fr; }
  .align-start { align-items: start; }
}
@media (min-width: 1080px) {
  .admin-shell { display: grid; grid-template-columns: 250px 1fr; }
  .admin-side { position: sticky; top: 0; height: 100vh; transform: none; width: auto; }
  .admin-burger { display: none; }
  .admin-content { padding: 26px 30px 60px; }
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-grid .span-2 { grid-column: span 2; }
  .admin-grid .span-3 { grid-column: 1 / -1; }
  .people-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .tabbar, .footer, .admin-side, .admin-top { display: none !important; }
}
