:root {
  --bg: #FBF7EF;
  --bg-alt: #F4EDDF;
  --surface: #FFFFFF;
  --ink: #2B2118;
  --ink-2: #5E5246;
  --muted: #8C7F71;
  --line: #E6DCCB;
  --accent: #B8680F;
  --accent-ink: #FFFFFF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60,40,20,.06), 0 8px 24px rgba(60,40,20,.06);
  --font: 'Kantumruy Pro', 'Khmer OS Battambang', system-ui, sans-serif;
  --font-head: 'Noto Serif Khmer', 'Kantumruy Pro', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
}
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.6; margin: 0; font-weight: 700; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251,247,239,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 22px;
}
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0 0 8px; font-size: .95rem; }
.hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 16px; }
.lead { color: var(--ink-2); font-size: 1.08rem; max-width: 56ch; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.95); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-danger { background: transparent; border-color: #E3B7AE; color: #A33A26; padding: 4px 12px; font-size: .85rem; }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.donut { width: min(280px, 70vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; }
.donut-hole {
  width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4;
}
.donut-num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; }
.donut-label { color: var(--muted); font-size: .9rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 24px; }
.legend li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend b { color: var(--ink); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }

/* Articles */
.article {
  display: grid; grid-template-columns: 120px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.article:first-of-type { border-top: 0; padding-top: 0; }
.article-no {
  font-family: var(--font-head); font-weight: 700; color: var(--accent);
  font-size: 1.1rem; white-space: nowrap;
}
.article-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.article-body h3 .en { font-family: var(--font); font-weight: 400; color: var(--muted); font-size: .95rem; margin-left: 6px; }
.article-body > p { color: var(--ink-2); margin: 0; max-width: 75ch; }

/* Funds */
.funds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.fund {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--c);
}
.fund-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fund-code { color: var(--c); font-weight: 600; font-size: .9rem; }
.fund h4 { font-size: 1.05rem; }
.fund-pct { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--c); line-height: 1.2; }
.fund-desc { color: var(--muted); font-size: .92rem; margin: 6px 0 12px; }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sub-top { display: flex; gap: 10px; align-items: baseline; }
.sub-pct {
  flex: none; min-width: 48px; text-align: center; font-weight: 700; font-size: .9rem;
  background: color-mix(in srgb, var(--c) 12%, white); color: var(--c);
  border-radius: 6px; padding: 0 6px;
}
.sub-text { font-size: .93rem; color: var(--ink-2); }
.bar { height: 6px; background: var(--bg-alt); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c); border-radius: 99px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.calc-input {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.calc-input label { font-weight: 600; display: block; margin-bottom: 8px; }
.input-row { display: flex; gap: 8px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.input-row select { width: auto; }
.calc-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.calc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; border-left: 4px solid var(--c);
}
.calc-card-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--c); font-weight: 600; }
.calc-card-head strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.calc-card-title { font-size: .92rem; color: var(--ink-2); margin-bottom: 6px; }
.calc-card ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.calc-card li { display: flex; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--line); padding: 4px 0; }
.calc-card li small { color: var(--muted); }
.calc-card li b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* Transparency */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat span { display: block; color: var(--muted); font-size: .9rem; }
.stat strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th, .tbl td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--bg-alt); font-weight: 600; white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.row-main td { font-weight: 600; }
.row-sub td { color: var(--ink-2); font-size: .9rem; }
.row-sub td:first-child { padding-left: 40px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.sub-head { font-size: 1.1rem; margin: 32px 0 12px; }
.recent { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.recent li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: 0; }
.recent .when { color: var(--muted); font-size: .9rem; }
.recent .amt { font-weight: 600; font-variant-numeric: tabular-nums; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-2); }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; }

/* Admin */
.admin-body { background: var(--bg-alt); }
.admin-main { padding: 32px 0 64px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.card h2 { font-size: 1.15rem; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.auth { max-width: 400px; margin: 10vh auto; }
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert-ok { background: #E7F3EA; color: #245A35; }
.alert-err { background: #FBE9E5; color: #8E2E1C; }
.inline { display: inline; }

@media (max-width: 860px) {
  .hero-inner, .calc { grid-template-columns: 1fr; }
  .funds, .calc-out { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .article { grid-template-columns: 1fr; gap: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* Donate */
.donate-section { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); border-bottom: 1px solid var(--line); }
.donate-grid { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }
.donate-grid h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin-bottom: 12px; }
.donate-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.donate-points li { padding-left: 28px; position: relative; color: var(--ink-2); }
.donate-points li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.donate-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; box-shadow: 0 12px 40px rgba(60,40,20,.10);
}
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg-alt); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.preset {
  font: inherit; font-weight: 600; padding: 8px 4px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-variant-numeric: tabular-nums;
}
.preset:hover { border-color: var(--accent); }
.preset.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lbl { display: block; font-weight: 500; font-size: .92rem; margin: 10px 0 4px; }
.amt-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding-left: 14px; }
.amt-input:focus-within { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.amt-input span { font-weight: 700; color: var(--muted); }
.amt-input input { border: 0; outline: 0 !important; font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn-block { width: 100%; margin-top: 16px; padding: 12px 20px; font-size: 1.05rem; }
.btn:disabled { opacity: .6; cursor: wait; }
#donErr { margin: 12px 0 0; }

/* Modal + KHQR card */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(30,20,10,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
}
.modal-box {
  position: relative; background: var(--surface); border-radius: 20px; width: 100%; max-width: 400px;
  padding: 28px 24px 24px; box-shadow: 0 24px 64px rgba(0,0,0,.25); margin: auto;
}
.modal-x { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.khqr-card { width: 280px; max-width: 100%; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.14); background: #fff; }
.khqr-head { background: #E1232E; height: 52px; display: flex; align-items: center; justify-content: center; position: relative; }
.khqr-head::after { content: ''; position: absolute; right: 0; bottom: -18px; border-left: 18px solid transparent; border-top: 18px solid #E1232E; }
.khqr-head span { color: #fff; font-weight: 800; letter-spacing: .06em; font-family: system-ui, sans-serif; font-size: 1.3rem; }
.khqr-meta { padding: 16px 24px 10px; line-height: 1.4; }
.khqr-name { font-size: .92rem; color: #333; }
.khqr-amt { font-family: system-ui, sans-serif; font-size: 1.6rem; font-weight: 800; color: #111; }
.khqr-dash { border-top: 1px dashed #ccc; margin: 4px 0 0; }
.khqr-qr { padding: 20px 28px 26px; }
.khqr-qr svg { display: block; width: 100%; height: auto; }
.qr-bank { text-align: center; margin: 16px 0 4px; font-size: .92rem; color: var(--ink-2); }
.qr-help { text-align: center; font-size: .85rem; color: var(--muted); margin: 0 0 12px; line-height: 1.7; }
.qr-wait { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--accent); font-weight: 500; margin-bottom: 12px; }
.spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qr-actions .btn { padding: 10px 8px; font-size: .92rem; }
.thanks { text-align: center; }
.thanks .lotus { font-size: 52px; line-height: 1.2; }
.thanks h3 { font-size: 1.5rem; color: var(--accent); margin: 4px 0 8px; }
.thanks-amt { font-size: 1.4rem; font-weight: 700; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.thanks p { color: var(--ink-2); margin: 0 0 10px; }
.blessing { background: var(--bg-alt); border-radius: 12px; padding: 14px 16px; font-size: .95rem; }
.thanks .btn { margin-top: 8px; min-width: 60%; }

@media (max-width: 860px) {
  .donate-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Volunteer */
.ref-note { background: var(--bg-alt); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-size: .92rem; color: var(--ink-2); }
.vol-wrap { max-width: 560px; margin: 0 auto; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-family: ui-monospace, monospace; font-size: .9rem; background: var(--bg-alt); }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.bal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.bal h3 { font-size: 1rem; margin-bottom: 8px; }
.bal dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-variant-numeric: tabular-nums; }
.bal dt { color: var(--muted); }
.bal dd { margin: 0; text-align: right; font-weight: 600; }
.bal .big { font-size: 1.5rem; color: var(--accent); }
.qr-mini { width: 220px; max-width: 100%; margin: 0 auto; }
.qr-mini svg { width: 100%; height: auto; display: block; }
.bal-grid.bal-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .bal-grid, .bal-grid.bal-3 { grid-template-columns: 1fr; } }

.pay-grid { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; } }
.info-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 12px; }
.info-dl dt { color: var(--muted); }
.info-dl dd { margin: 0; font-weight: 500; word-break: break-all; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #C0392B; color: #fff; font-size: .75rem; line-height: 20px; text-align: center; font-weight: 700; }

/* Hero slider */
.slider { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 16px 48px rgba(60,40,20,.18); background: var(--bg-alt); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; position: relative; scroll-snap-align: start; aspect-ratio: 4 / 3; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 34px;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-weight: 500; line-height: 1.5; font-size: .98rem;
}
.sl-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.85); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); opacity: 0; transition: opacity .2s;
}
.slider:hover .sl-nav, .sl-nav:focus-visible { opacity: 1; }
.sl-prev { left: 12px; } .sl-next { right: 12px; }
.sl-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.sl-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: width .25s, background .25s; }
.sl-dots button.on { width: 22px; background: #fff; }

/* Videos */
.video-section { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.video-card { background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.yt, .yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; position: relative; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (hover: hover) {
  .yt img { transition: transform .4s, filter .4s; }
  .yt:hover img { transform: scale(1.03); filter: brightness(.9); }
  }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-play svg { filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); transition: transform .2s; }
.video-title { font-family: var(--font); font-size: 1rem; font-weight: 600; padding: 12px 16px 14px; margin: 0; line-height: 1.6; }

/* Admin media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.media-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.media-item.off { opacity: .5; }
.media-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.media-form { display: grid; gap: 6px; padding: 10px; }
.media-form input { padding: 6px 10px; font-size: .9rem; }
.btn-sm { padding: 4px 12px; font-size: .85rem; }

@media (max-width: 860px) {
  .slider { border-radius: 18px; }
  .sl-nav { display: none; }
  /* វីដេអូ៖ អូសឆ្វេងស្ដាំលើទូរស័ព្ទ */
  /* វីដេអូ៖ តម្រៀបបញ្ឈរលើទូរស័ព្ទ */
  .videos { grid-template-columns: 1fr; gap: 16px; }
  .video-card { box-shadow: none; }
  .video-title { font-size: .95rem; padding: 10px 14px 12px; }
}

/* Donate section នៅខាងលើគេ */
.donate-top { padding: 40px 0 56px; }
.donate-grid { grid-template-areas: "intro card" "points card"; grid-template-rows: 1fr 1fr; row-gap: 20px; align-items: start; }
.donate-grid > .donate-intro { grid-area: intro; align-self: end; }
.donate-grid > .donate-points { grid-area: points; align-self: start; }
.donate-grid > .donate-card { grid-area: card; align-self: center; }
.ref-note { text-align: center; font-size: 1rem; }
.ref-note b { color: var(--ink); }
@media (max-width: 860px) {
  .donate-top { padding: 20px 0 36px; }
  .donate-grid { grid-template-areas: "intro" "card" "points"; grid-template-rows: auto; gap: 16px; }
  .donate-grid > .donate-intro, .donate-grid > .donate-card { align-self: start; }
  .donate-intro .eyebrow { margin-bottom: 2px; }
  .donate-intro h2 { font-size: 1.35rem; margin-bottom: 4px; }
  .donate-intro .lead { font-size: .95rem; margin: 0; }
  .donate-card { padding: 18px; }
}

/* USDT */
.net-pick { margin: -4px 0 14px; }
.net-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.net-chips input { position: absolute; opacity: 0; pointer-events: none; }
.net-chips span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.net-chips input:checked + span { background: #26A17B; border-color: #26A17B; color: #fff; }
.net-chips input:focus-visible + span { outline: 2px solid #26A17B; outline-offset: 2px; }
.usdt-card { border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.14); background: #fff; }
.usdt-head { background: #26A17B; color: #fff; font-weight: 700; padding: 12px 16px; display: flex; align-items: center; gap: 8px; font-family: system-ui, sans-serif; }
.usdt-logo { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #26A17B; display: grid; place-items: center; font-weight: 800; }
.usdt-body { padding: 14px 16px 16px; }
.lbl-sm { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.copy-row code { font-size: .78rem; word-break: break-all; background: var(--bg-alt); padding: 6px 8px; border-radius: 8px; flex: 1; }
.usdt-amt { font-family: system-ui, sans-serif; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.usdt-qr { width: 170px; margin: 10px auto 4px; }
.usdt-qr svg { width: 100%; height: auto; display: block; }
.usdt-warn { background: #FFF6E5; border: 1px solid #F3D9A4; color: #7A4F0B; border-radius: 12px; padding: 10px 12px; font-size: .86rem; line-height: 1.7; margin: 12px 0 4px; }
.copy-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.modal-box { min-width: 0; }
.usdt-card, .usdt-body { min-width: 0; }
@media (max-width: 480px) { .modal { padding: 10px; } .modal-box { padding: 24px 14px 16px; } .usdt-amt { font-size: 1.35rem; } }
/* radio ដែលលាក់ មិនឲ្យលើសទំហំអេក្រង់ */
.seg label, .net-chips label { position: relative; }
.seg input, .net-chips input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
body { overflow-x: clip; }
.amt-input span { white-space: nowrap; font-size: .95rem; }
.usdt-switch.is-on { border-left: 5px solid #26A17B; }
.usdt-switch.is-off { border-left: 5px solid #B9AFA2; }
.usdt-switch.is-on .sw-state { color: #1E8A66; }
.usdt-switch.is-off .sw-state { color: #8C7F71; }

/* Link preview (admin) */
.og-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.og-card { border-left: 3px solid #3B82F6; background: #F3F6FA; border-radius: 8px; padding: 10px 12px; max-width: 380px; font-family: system-ui, sans-serif; }
.og-site { color: #3B82F6; font-weight: 600; font-size: .85rem; }
.og-title { font-weight: 700; font-size: .95rem; line-height: 1.5; margin-top: 2px; }
.og-desc { font-size: .85rem; color: #333; line-height: 1.5; margin: 2px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.og-img { aspect-ratio: 1200 / 630; border-radius: 6px; overflow: hidden; background: #DDE3EA; display: grid; place-items: center; color: #889; font-size: .85rem; }
.og-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) { .og-grid { grid-template-columns: 1fr; } }
.tg-step { display: flex; gap: 14px; padding: 12px 0; border-top: 1px dashed var(--line); }
.tg-step:first-of-type { border-top: 0; }
.tg-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-alt); color: var(--ink-2); display: grid; place-items: center; font-weight: 700; }
.tg-num.done { background: #2F7A48; color: #fff; }
.tg-body { flex: 1; min-width: 0; }
.tg-chats { display: grid; gap: 8px; margin-top: 10px; }
.tg-chat { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.btn.disabled { pointer-events: none; opacity: .5; }

.v-dots { display: none; }
@media (max-width: 860px) {
  .v-dots { display: none; }
  .v-dots span { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: width .25s, background .25s; }
  .v-dots span.on { width: 20px; background: var(--accent); }
}

/* ===== Admin: អត្ថបទ Homepage ===== */
.content-nav { background: #fff; border: 1px solid var(--line, #e7e1d6); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; position: sticky; top: 70px; z-index: 5; }
.content-nav a { font-weight: 500; }
.cgroup { border: 1px solid var(--line, #e7e1d6); border-radius: 12px; padding: 12px 16px 14px; margin: 0 0 14px; min-width: 0; }
.cgroup legend { font-weight: 600; padding: 0 6px; color: var(--accent); }
.crow { margin-bottom: 10px; }
.crow:last-child { margin-bottom: 0; }
.crow textarea { min-height: 70px; }
.cbadge { display: inline-block; font-size: .72rem; background: var(--bg-alt); color: var(--accent); border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-weight: 500; }
.linklike { background: none; border: 0; padding: 2px 0; color: var(--accent); cursor: pointer; text-decoration: underline; font: inherit; }
.csave { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; position: sticky; bottom: 0; background: #fff; padding: 10px 0; }
.csub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line, #e7e1d6); }
@media (max-width: 700px) { .cgroup .form-grid { grid-template-columns: 1fr !important; } .content-nav { top: 0; } }
