/* ================================================================
   DongKaichon — สไตล์ทั้งหมด (พื้นดำ เส้นขอบส้ม ตามหน้าเว็บ Wix ของลูกค้า)
   ================================================================ */
:root {
  --bg: #000;
  --bg-2: #0b0b0b;
  --surface: #121212;
  --surface-2: #1b1b1b;
  --line: #2b2b2b;
  --orange: #ff8a00;
  --orange-2: #ffae3d;
  --orange-dark: #d96f00;
  --text: #ffffff;
  --muted: #b9b9b9;
  --radius: 14px;
  --header-h: 68px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-logo: 'Playfair Display', Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 300; font-size: 16px; line-height: 1.6; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 300; padding: 8px 14px; border-radius: 8px; background: var(--orange); color: #000; transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: none; }

/* โลโก้: DongKaichon ตัวมีเชิง "Dong" สีส้ม + ดงไก่ชน ตัวเอียง */
.logo { display: inline-grid; justify-items: start; line-height: 1; }
.logo-en { font-family: var(--font-logo); font-weight: 700; letter-spacing: -.01em; color: #fff; }
.logo-en em { font-style: normal; color: var(--orange); }
.logo-th em { font-style: inherit; color: var(--orange); }
.logo-th { font-weight: 700; font-style: italic; color: #fff; }
.logo-big .logo-th { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.logo-big .logo-en { font-size: clamp(2.8rem, 7vw, 4.8rem); }

/* ----- ปุ่ม ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 20px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s, transform .2s, box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; box-shadow: 0 8px 20px -10px var(--orange); }
.btn-primary:hover { box-shadow: 0 10px 26px -8px var(--orange); }
.btn-outline { border-color: var(--orange); color: var(--orange); background: rgba(0, 0, 0, .35); }
.btn-outline:hover { background: var(--orange); color: #000; }
.btn-ghost { border-color: var(--line); background: var(--surface-2); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-2); }
.btn-glass { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); }
.btn-line { background: #06c755; color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.btn-lg { min-height: 54px; padding: 10px 26px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px 12px; }
.btn-ghost.is-on { color: #ff5a6e; border-color: #ff5a6e; }

/* ----- แถบบน ----- */
.site-header { position: sticky; top: 0; z-index: 90; background: rgba(0, 0, 0, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.hdr { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.hdr-logo { text-decoration: none; font-size: 1.45rem; }
.hdr-nav { display: flex; gap: 2px; margin-inline: auto; }
.hdr-nav a { padding: 8px 11px; border-radius: 8px; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: transparent; font-weight: 500; font-size: .95rem; white-space: nowrap; transition: color .2s, text-decoration-color .2s; }
.hdr-nav a:hover, .hdr-nav a.is-current, .hdr-nav a[aria-current] { color: var(--orange-2); text-decoration-color: var(--orange); }
.hdr-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hdr-nav + .hdr-tools { margin-left: 0; }
.hdr-icon { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: background-color .2s, color .2s; }
.hdr-icon:hover { background: var(--surface-2); color: var(--orange-2); }
.hdr-icon .icon { width: 22px; height: 22px; }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #000; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.badge.dot { min-width: 9px; width: 9px; height: 9px; top: 8px; right: 9px; padding: 0; background: #ff4d4f; }
.hdr-cta { margin-left: 6px; }
.hdr-user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.hdr-user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--orange-2), var(--orange-dark)); color: #000; font-weight: 700; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.hdr-burger { display: none; }

/* ----- หน้าหลัก ----- */
.hero { position: relative; min-height: clamp(420px, 62vh, 620px); display: grid; align-items: center; background-size: cover; background-position: center right; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .1)), linear-gradient(0deg, #000 0%, transparent 25%); }
.hero-inner { padding-block: 60px; }
.hero-logo { margin-bottom: 18px; }
.hero-tag { color: var(--orange); font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 600; }
.hero-sub { margin: 6px 0 34px; font-size: 1rem; }

/* ตัวเลข */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: -10px; position: relative; z-index: 2; }
.stat { display: grid; justify-items: center; gap: 2px; padding: 16px 10px 14px; border: 1.5px solid var(--orange); border-radius: 12px; background: var(--bg-2); text-align: center; }
.stat-ic { font-size: 2rem; line-height: 1.1; }
.stat b { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span:last-child { color: var(--muted); font-size: clamp(.95rem, 1.6vw, 1.2rem); }

/* หัวข้อ */
.section { padding-block: clamp(48px, 7vw, 80px); }
.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 600; }
.sec-title small { font-size: .95rem; font-weight: 500; margin-left: 8px; }
.sec-title-lg { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.sec-title em { font-style: normal; color: var(--orange); }
.sec-sub { margin: 8px 0 26px; color: var(--muted); font-size: 1.15rem; }
.sec-center { text-align: center; }
.sec-flame { display: flex; align-items: center; gap: 10px; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 22px; }
.sec-flame .icon { color: var(--orange); width: 1.1em; height: 1.1em; }
.eyebrow { color: var(--orange); font-size: 1.1rem; font-weight: 500; text-align: center; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px auto; color: var(--orange); }
.divider::before, .divider::after { content: ''; width: 70px; height: 1.5px; background: var(--orange); opacity: .7; }
.divider .icon { width: 30px; height: 30px; }

/* ตาราง */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* การ์ดไก่ */
.rcard { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--orange); border-radius: 12px; background: var(--bg-2); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.rcard:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px var(--orange); }
.rcard-featured { padding: 8px; border-width: 2px; }
.rcard-img { position: relative; display: block; padding: 0; border: 0; background: var(--surface-2); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.rcard-featured .rcard-img { border-radius: 6px; aspect-ratio: 5 / 4; }
.rcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rcard:hover .rcard-img img { transform: scale(1.06); }
.rcard-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: var(--orange-2); font-size: .74rem; font-weight: 500; }
.rcard-fav { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; transition: transform .2s, color .2s; }
.rcard-featured .rcard-fav { top: 16px; right: 16px; }
.rcard-fav:hover { transform: scale(1.1); }
.rcard-fav.is-on { color: #ff5a6e; }
.rcard-body { display: grid; gap: 4px; padding: 12px 10px 10px; }
.rcard-featured .rcard-body { padding: 10px 2px 2px; }
.rcard-body h3 { font-size: 1.2rem; font-weight: 500; }
.rcard-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rcard-loc .icon { color: var(--orange); width: 1em; height: 1em; }
.rcard-price { color: var(--orange); font-weight: 500; font-size: 1.1rem; }
.rcard-featured .rcard-price { color: var(--text); font-size: .95rem; }
.rcard-more { margin-top: 4px; padding: 3px 8px; border: 1.5px solid var(--orange); border-radius: 6px; background: none; color: var(--text); font-weight: 500; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: background-color .2s, color .2s; }
.rcard-more:hover { background: var(--orange); color: #000; }
.rcard-featured .rcard-more { justify-self: start; border: 0; padding: 0; color: var(--orange); }
.rcard-featured .rcard-more:hover { background: none; color: var(--orange-2); }

/* ค้นหา + ตัวกรอง */
.search { display: flex; gap: 10px; max-width: 760px; padding: 8px; border-radius: 18px; background: var(--surface-2); }
.search-box { display: flex; align-items: center; gap: 10px; flex: 1; padding-inline: 10px; }
.search-box .icon { width: 24px; height: 24px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; outline: 0; font-size: 1.1rem; }
.search .btn { border-radius: 12px; min-width: 110px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 18px 0 6px; }
.select { display: grid; gap: 2px; font-size: .82rem; color: var(--muted); }
.select select { min-width: 150px; min-height: 40px; padding: 6px 30px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23ff8a00' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center / 18px; color: var(--text); appearance: none; -webkit-appearance: none; cursor: pointer; }
.select select:hover, .select select:focus { border-color: var(--orange); }
.result-info { margin: 6px 0 14px; color: var(--muted); font-size: .92rem; }
.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.pager button { min-width: 40px; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--orange); font-size: 1.05rem; cursor: pointer; }
.pager button:first-child, .pager button:last-child { color: var(--text); }
.pager button:hover:not(:disabled) { background: var(--surface-2); }
.pager button[aria-current] { background: var(--orange); color: #000; font-weight: 600; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { color: var(--orange); }
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 0; }
.empty .icon { color: var(--orange); }
.empty-wide { grid-column: 1 / -1; justify-content: center; padding: 40px 0; }

/* ลงขายไก่ */
.sell-band { position: relative; isolation: isolate; padding-block: clamp(40px, 6vw, 64px); background-size: cover; background-position: right center; }
.sell-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .92) 30%, rgba(0, 0, 0, .45) 65%, rgba(0, 0, 0, .1)); }
.sell-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.sell-title em { font-style: italic; color: var(--orange); font-weight: 700; }
.sell-sub { margin: 6px 0 20px; color: #ddd; }
.sell-points { display: grid; grid-template-columns: .8fr 1fr 1fr 1.1fr; max-width: 560px; margin: 0; padding: 10px; list-style: none; border: 1.5px solid var(--orange); border-radius: 10px; background: rgba(0, 0, 0, .55); }
.sell-points li { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 6px; text-align: center; font-size: .78rem; color: #ccc; }
.sell-points li + li { border-left: 1px solid rgba(255, 138, 0, .45); }
.sell-points .icon { width: 30px; height: 30px; color: var(--orange); }
.sell-points b { color: #fff; font-size: .9rem; font-weight: 500; }
.sell-free b { color: var(--orange); font-size: 1.15rem; }
.sell-free strong { color: var(--orange); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.sell-free strong small { color: #fff; font-size: .9rem; }
.sell-cta { margin-top: 22px; }
.sell-cta .icon:first-child { width: 30px; height: 30px; }
.sell-note { margin-top: 12px; font-size: .9rem; color: #ddd; }

.steps-band { border-block: 1.5px solid var(--orange); padding-block: 26px 30px; background: var(--bg); }
.steps-title { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 20px; font-size: 1.15rem; }
.steps-title::before, .steps-title::after { content: ''; width: 60px; height: 1.5px; background: var(--orange); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid #3a3a3a; border-radius: 8px; background: var(--bg-2); }
.steps .icon { width: 34px; height: 34px; color: var(--orange-2); }
.steps b { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.steps b i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); color: #000; font-size: .72rem; font-style: normal; font-weight: 700; }
.steps span { display: block; color: var(--muted); font-size: .85rem; line-height: 1.4; }

/* คลังความรู้ */
.learn {
  display: grid; align-content: center; gap: 8px; min-height: 150px; padding: 18px; text-align: left;
  border: 1.5px solid var(--orange); border-radius: 8px; background-size: cover; background-position: center right; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.learn:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px var(--orange); }
.learn-title { display: flex; align-items: center; gap: 10px; }
.learn-title .icon { width: 34px; height: 34px; color: var(--orange); }
.learn-title b { font-size: 1.4rem; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.learn-text { max-width: 60%; font-size: 1rem; line-height: 1.45; }
.learn-more { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); font-weight: 500; text-decoration: underline; }

/* บทความ */
.acard { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-align: left; cursor: pointer; transition: transform .3s var(--ease), border-color .3s; }
.acard:hover { transform: translateY(-4px); border-color: var(--orange); }
.acard-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; }
.acard-cat { position: absolute; top: 8px; left: 8px; padding: 1px 12px; border-radius: 6px; background: var(--orange); color: #000; font-size: .82rem; font-weight: 600; }
.acard-body { display: grid; gap: 6px; padding: 12px; }
.acard-body > b { font-size: 1.1rem; font-weight: 500; line-height: 1.35; }
.acard-body > span:not(.acard-meta) { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.acard-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: .85rem; }
.acard-meta span { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.disclaimer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.disclaimer p { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--orange); border-radius: 10px; font-size: .9rem; color: #ddd; }
.disclaimer p .icon { width: 26px; height: 26px; color: var(--orange); }

/* ทำไมต้อง DongKaichon */
.why { position: relative; isolation: isolate; padding-block: clamp(48px, 7vw, 80px); background-size: cover; background-position: center right; }
.why::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .85) 25%, rgba(0, 0, 0, .3) 60%, rgba(0, 0, 0, .15)); }
.why-inner { position: relative; }
.why-title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.why-title .logo-en { font-size: 1.1em; }
.why-sub { margin: 14px 0 34px; font-size: 1.1rem; }
.why-list { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.why-list li { display: flex; align-items: center; gap: 12px; }
.why-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--orange); color: #000; }
.why-ic .icon { width: 30px; height: 30px; }
.why-list b { display: block; font-size: 1.1rem; font-weight: 500; }
.why-list span { font-size: .9rem; color: #ddd; }
.why-cta { position: absolute; right: var(--gutter); bottom: 0; min-width: 160px; }

/* ท้ายเว็บ */
.site-footer { padding-block: 48px 30px; background: #000; text-align: center; }
.ftr-logo { text-decoration: none; display: inline-block; }
.ftr-logo .logo { justify-items: center; }
.ftr-tag { margin-top: 10px; font-size: clamp(1.05rem, 2.4vw, 1.4rem); }
.ftr-line { display: block; width: 120px; height: 1.5px; margin: 14px auto 28px; background: var(--orange); }
.ftr-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 42px; margin: 0 0 28px; padding: 0; list-style: none; text-align: left; }
.ftr-contacts a { display: flex; align-items: flex-start; gap: 10px; text-decoration: none; }
.ftr-contacts .icon { width: 30px; height: 30px; }
.ftr-contacts span { display: grid; line-height: 1.3; font-size: .9rem; color: #ccc; max-width: 160px; }
.ftr-contacts b { color: #fff; font-size: 1.05rem; font-weight: 500; }
.c-line { color: #06c755; } .c-fb { color: #1877f2; } .c-tt { color: #fff; } .c-orange { color: var(--orange); }
.ftr-copy { color: #bbb; font-size: .9rem; }
.ftr-copy small { color: #777; }

/* ----- แชตบอต ----- */
.chat { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 95; display: grid; justify-items: end; gap: 10px; }
.chat-hint { position: relative; max-width: 220px; padding: 10px 30px 10px 12px; border-radius: 12px; background: #fff; color: #222; font-size: .85rem; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); animation: hint 3s ease-in-out infinite; }
.chat-hint button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: #444; cursor: pointer; }
@keyframes hint { 50% { transform: translateY(-4px); } }
.chat-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; border: 0; border-radius: 999px; background: #2563eb; color: #fff; font-weight: 500; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(37, 99, 235, .8); }
.chat.is-open .chat-btn { display: none; }
.chat-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; width: min(360px, calc(100vw - 32px)); height: min(520px, calc(100svh - 120px)); border: 1.5px solid var(--orange); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.chat-panel header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(90deg, var(--orange-dark), var(--orange)); color: #000; }
.chat-panel header small { display: block; font-size: .78rem; opacity: .8; }
.chat-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #000; color: var(--orange); }
.chat-x { margin-left: auto; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .15); color: #000; cursor: pointer; }
.chat-log { display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .92rem; line-height: 1.5; }
.msg-bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg-me { align-self: flex-end; background: var(--orange); color: #000; border-bottom-right-radius: 4px; }
.msg-link { display: inline-block; margin-top: 6px; color: var(--orange-2); font-weight: 500; }
.chat-quick { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.chat-quick button { flex: none; padding: 5px 12px; border: 1px solid var(--orange); border-radius: 999px; background: none; color: var(--orange-2); font-size: .82rem; cursor: pointer; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); outline: 0; }
.chat-form input:focus { border-color: var(--orange); }
.chat-form button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--orange); color: #000; cursor: pointer; }

/* ----- กล่องข้อความ ----- */
.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 32px); padding: 26px; border: 1.5px solid var(--orange); border-radius: 16px; background: var(--surface); color: var(--text); overflow-y: auto; }
.modal::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-sm { width: min(440px, calc(100vw - 24px)); }
.modal-md { width: min(760px, calc(100vw - 24px)); }
.modal-lg { width: min(1000px, calc(100vw - 24px)); }
.modal-x { position: sticky; top: -12px; float: right; margin: -12px -12px 0 0; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: #fff; cursor: pointer; }
.modal-x:hover { border-color: var(--orange); color: var(--orange-2); }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin-bottom: 14px; }
.modal-title .icon { color: var(--orange); }
.modal-sub { margin: -8px 0 16px; color: var(--muted); }
.modal-foot { margin-top: 16px; text-align: center; color: var(--muted); font-size: .9rem; }
.modal-foot a { color: var(--orange-2); }
.mini-list, .notice-list, .user-menu { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.mini-list img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.mini-list span { display: grid; flex: 1; min-width: 0; }
.mini-list small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.notice-list li { display: flex; gap: 12px; padding: 10px; border-bottom: 1px solid var(--line); }
.notice-list small { display: block; color: var(--muted); font-size: .8rem; }
.notice-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 138, 0, .15); color: var(--orange); }
.user-card { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.user-card p { color: var(--muted); }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-decoration: none; text-align: left; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { border-color: var(--orange); }
.user-menu .icon { color: var(--orange); }
.user-menu small { margin-left: auto; color: var(--muted); }
.confirm { text-align: center; }
.confirm-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 138, 0, .15); color: var(--orange); }
.confirm-ic .icon { width: 28px; height: 28px; }
.confirm h2 { margin-top: 12px; font-size: 1.3rem; }
.confirm p { margin-top: 6px; color: var(--muted); }
.confirm-actions { display: flex; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { flex: 1; }

/* รายละเอียดไก่ */
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
.detail-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--orange); }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.detail-thumbs button { width: 74px; height: 74px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .6; }
.detail-thumbs button[aria-current="true"] { border-color: var(--orange); opacity: 1; }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-info .eyebrow { text-align: left; font-size: .9rem; }
.detail-info h2 { font-size: 1.8rem; }
.detail-price { margin: 4px 0 14px; color: var(--orange); font-size: 1.8rem; font-weight: 600; }
.detail-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.detail-specs div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); }
.detail-specs .icon { grid-row: span 2; color: var(--orange); }
.detail-specs dt { color: var(--muted); font-size: .78rem; }
.detail-specs dd { margin: 0; font-weight: 500; }
.detail-desc { color: #ddd; margin-bottom: 14px; }
.seller { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.seller small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.seller small .icon { color: #22c55e; width: 1em; height: 1em; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-safe { display: flex; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 138, 0, .1); color: #ddd; font-size: .85rem; }
.detail-safe .icon { color: var(--orange); }

/* บทความ (กล่อง) */
.article h2 { font-size: 1.7rem; margin: 6px 0 4px; }
.article .eyebrow { text-align: left; margin-top: 14px; }
.article-img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 12px; }
.article > p:not(.eyebrow):not(.acard-meta) { margin-top: 12px; color: #e5e5e5; line-height: 1.8; }
.article h3 { margin: 22px 0 10px; }
.article-note { display: flex; gap: 8px; padding: 10px 12px; border: 1px solid var(--orange); border-radius: 10px; font-size: .9rem; }
.article-note .icon { color: var(--orange); }

/* ----- ฟอร์ม (สมัครสมาชิก / ลงขาย / เข้าสู่ระบบ) ----- */
.page-head { padding-block: 40px 20px; text-align: center; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head h1 .logo-en { font-size: 1.05em; }
.page-head p { margin-top: 6px; color: #ddd; font-size: 1.1rem; }
.form-card { max-width: 980px; margin: 0 auto 30px; padding: clamp(18px, 3vw, 30px); border: 1.5px solid var(--orange); border-radius: 14px; background: var(--bg-2); }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-3 { grid-template-columns: 1fr 1.6fr 1fr; }
.form-h { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--orange-2); font-size: 1.05rem; }
.field { display: grid; gap: 4px; font-size: .9rem; }
.field > span { font-weight: 500; }
.field > span i { color: var(--orange); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #3a3a3a; border-radius: 8px; background: #000; color: #fff; outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23ff8a00' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; padding-right: 34px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 0, .2); }
.field small { color: var(--muted); font-size: .78rem; }
.field.is-bad input, .field.is-bad select, .field.is-bad textarea, .field.is-bad .upload { border-color: #ff5a5f; }
.field .err { color: #ff7a7f; font-size: .8rem; }
.upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border: 1px dashed #3a3a3a; border-radius: 10px; }
.upload-btn { display: inline-grid; place-items: center; width: 64px; height: 36px; border-radius: 8px; background: var(--orange); color: #fff; cursor: pointer; }
.upload-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-btn:focus-within { outline: 3px solid var(--orange-2); outline-offset: 2px; }
.thumb { position: relative; width: 70px; height: 70px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.thumb button .icon { width: 14px; height: 14px; }
.btn-submit { min-height: 48px; background: #2563eb; color: #fff; border-radius: 8px; }
.btn-submit:hover { background: #1d4ed8; }
.form-error { color: #ff7a7f; font-size: .9rem; }
.form-foot { display: grid; justify-items: center; gap: 14px; margin-bottom: 40px; }
.form-foot .btn { min-width: 220px; }
.secure-note { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #ddd; }
.secure-note .icon { color: var(--orange); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); }
.done { display: grid; justify-items: center; gap: 10px; padding: 30px 10px; text-align: center; }
.done-ic { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: rgba(34, 197, 94, .15); color: #22c55e; }
.done-ic .icon { width: 40px; height: 40px; }
.done h2 { font-size: 1.6rem; }
.done p { color: #ccc; max-width: 520px; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* ประกาศของฉัน */
.my-list { display: grid; gap: 10px; }
.my-item { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.my-item img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.my-item b { display: block; font-size: 1.05rem; font-weight: 500; }
.my-item small { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.status-pending { background: rgba(255, 174, 61, .15); color: var(--orange-2); }
.status-live { background: rgba(34, 197, 94, .15); color: #4ade80; }
.my-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.quota { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border-radius: 12px; background: rgba(255, 138, 0, .1); border: 1px solid rgba(255, 138, 0, .4); }
.quota b { color: var(--orange-2); }

/* toast */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 400; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: #111; font-weight: 500; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8); translate: -50% 20px; opacity: 0; pointer-events: none; transition: translate .35s var(--ease), opacity .3s; max-width: calc(100vw - 32px); }
.toast.is-shown { translate: -50% 0; opacity: 1; }
.toast .icon { color: #16a34a; }
.toast.is-warn .icon { color: var(--orange-dark); }

/* แสดงเมื่อเลื่อนถึง */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ----- จอกลาง / เล็ก ----- */
@media (max-width: 1180px) {
  .hdr-burger { display: inline-grid; }
  .hdr-nav {
    position: fixed; inset: var(--header-h) 0 auto; display: grid; gap: 2px; padding: 12px var(--gutter) 20px;
    background: #000; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .7);
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .35s var(--ease), visibility .35s;
  }
  .nav-open .hdr-nav { clip-path: inset(0 0 0 0); visibility: visible; }
  .hdr-nav a { padding: 12px; font-size: 1.05rem; text-decoration: none; }
  .hdr-nav a:hover, .hdr-nav a.is-current { background: var(--surface-2); }
}
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .hdr-cta { display: none; }
  .hdr-user-name { display: none; }
  .hdr-user { padding: 3px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 14px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .rcard-body h3 { font-size: 1.05rem; }
  .search { flex-direction: column; }
  .filters .select { flex: 1 1 calc(50% - 10px); }
  .filters .select select { min-width: 0; width: 100%; }
  .sell-points { grid-template-columns: 1fr 1fr; }
  .sell-points li + li { border-left: 0; }
  .sell-points li { border-top: 1px solid rgba(255, 138, 0, .3); }
  .sell-points li:nth-child(-n+2) { border-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .learn-text { max-width: 70%; }
  [data-learn] { grid-template-columns: 1fr; }
  .learn { min-height: 128px; }
  .why-cta { position: static; margin-top: 26px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .my-item { grid-template-columns: 64px minmax(0, 1fr); }
  .my-item img { width: 64px; height: 64px; }
  .my-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .chat-btn span { display: none; }
  .chat-btn { width: 52px; padding: 0; }
  .chat-hint { max-width: 180px; }
  .modal { padding: 20px 16px; }
  .detail-specs { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  /* จอแคบมาก: ซ่อนไอคอนค้นหา/แจ้งเตือนที่แถบบน (ค้นหาได้ในส่วนไก่ชนทั้งหมด) แถบบนจะได้ไม่ล้นจอ */
  [data-search-open], [data-notice-open] { display: none !important; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rcard-featured { padding: 5px; }
  .hdr { gap: 8px; }
  .hdr-logo { font-size: 1.2rem; }
  .hdr-icon { width: 36px; height: 36px; }
  .steps { grid-template-columns: 1fr; }
  .stat { padding: 12px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================
   ระบบตลาด: สมาชิก / คำสั่งซื้อ (พักเงิน) / แชต / โปรไฟล์ / กติกา / หลังบ้าน
   ================================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.confirm-ic.is-danger { background: rgba(220, 38, 38, .15); color: #f87171; }
.hint { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: .85rem; }
.hint .icon { color: var(--orange); flex: none; margin-top: 2px; }
.pager button { display: inline-flex; align-items: center; gap: 4px; }

/* สถานะ */
.status-done { background: rgba(148, 163, 184, .15); color: #cbd5e1; }
.status-off { background: rgba(148, 163, 184, .12); color: #a1a1aa; }
.status-bad { background: rgba(239, 68, 68, .15); color: #f87171; }
.status .icon { width: 1em; height: 1em; }

/* แถบบน: ภาษา + แถบสถานะบัญชี */
.hdr-lang { position: relative; }
.hdr-lang-btn { width: auto; padding: 0 8px; border-radius: 999px; gap: 4px; display: inline-flex; }
.hdr-lang-btn b { font-size: .78rem; font-weight: 600; }
.lang-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; display: grid; min-width: 140px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8); }
.lang-pop button { padding: 9px 12px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.lang-pop button:hover, .lang-pop button[aria-current] { background: var(--surface-2); color: var(--orange-2); }
.status-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 8px var(--gutter); font-size: .9rem; text-align: center; }
.status-bar.is-wait { background: rgba(255, 174, 61, .14); color: var(--orange-2); }
.status-bar.is-bad { background: rgba(239, 68, 68, .14); color: #fca5a5; }
.status-bar.is-info { background: #1e3a8a; color: #dbeafe; }
.notice-list li.is-new { background: rgba(255, 138, 0, .06); }
.notice-list a { text-decoration: none; }
.notice-list a:hover { color: var(--orange-2); }
.demo-users { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.demo-users summary { display: flex; align-items: center; gap: 8px; color: var(--orange-2); cursor: pointer; font-weight: 500; }
.demo-users ul { display: grid; gap: 6px; margin: 10px 0; padding: 0; list-style: none; }
.demo-users li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-align: left; cursor: pointer; }
.demo-users li button:hover { border-color: var(--orange); }
.demo-users li span { display: grid; line-height: 1.3; }
.demo-users small { color: var(--muted); font-size: .8rem; }
.demo-admin { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-2); }
img.avatar { object-fit: cover; padding: 0; }
.avatar-xl { width: 96px; height: 96px; font-size: 2.4rem; border: 3px solid var(--orange); }
.ftr-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 16px; font-size: .9rem; }
.ftr-links a { color: var(--orange-2); }
.ftr-soon { display: flex; align-items: flex-start; gap: 10px; }

/* การ์ดไก่ (เพิ่ม) */
.rcard-tag.is-hold { color: #fde68a; }
.rcard-tag.is-sold { color: #cbd5e1; }
.rcard.is-sold .rcard-img img { filter: grayscale(.7) brightness(.7); }
.rcard-meta { display: grid; gap: 1px; margin-top: 2px; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.rcard-meta a { color: var(--orange-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-meta a:hover { text-decoration: underline; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .st { width: 1em; height: 1em; color: #52525b; }
.stars .st.on { color: #fbbf24; }
.stars-lg .st { width: 1.4em; height: 1.4em; }
a.seller { text-decoration: none; transition: border-color .2s; }
a.seller:hover { border-color: var(--orange); }
.seller > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.seller-go { color: var(--muted); }
.warn-text { display: inline-flex; align-items: center; gap: 3px; color: #fbbf24; }
.seller small .warn-text .icon { color: #fbbf24; }
.detail-safe a { color: var(--orange-2); }

/* หน้าแรก: ขั้นตอนพักเงิน */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.flow li { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 20px 14px; border: 1.5px solid var(--orange); border-radius: 14px; background: var(--bg-2); text-align: center; }
.flow li + li::before { content: ''; position: absolute; left: -15px; top: 50%; width: 16px; height: 2px; background: var(--orange); }
.flow-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 138, 0, .15); color: var(--orange); }
.flow-ic .icon { width: 30px; height: 30px; }
.flow b { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.flow b i { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--orange); color: #000; font-size: .75rem; font-style: normal; font-weight: 700; }
.flow span { color: var(--muted); font-size: .88rem; }

/* ลงขาย / สมัคร */
.editing { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(37, 99, 235, .15); color: #bfdbfe; }
.editing span { flex: 1; }
.done-ic.is-wait { background: rgba(255, 138, 0, .15); color: var(--orange); }
.done .hint { justify-content: center; }
.quota.is-bad { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .5); justify-content: flex-start; }
.quota.is-bad .icon { color: #f87171; }

/* แท็บ */
.tabs { display: flex; gap: 6px; margin: 22px 0 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 500; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--orange); }
.tabs button b { padding: 0 7px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; }
.tab-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .7rem; font-style: normal; font-weight: 700; }

/* โปรไฟล์ */
.pf-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 28px; padding: 22px; border: 1.5px solid var(--orange); border-radius: 18px; background: linear-gradient(135deg, rgba(255, 138, 0, .12), transparent 60%), var(--bg-2); }
.pf-main h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.pf-farm { color: var(--orange-2); font-size: 1.05rem; }
.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: .9rem; }
.pf-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.pf-warn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 8px; background: rgba(251, 191, 36, .12); color: #fcd34d; font-size: .88rem; }
.pf-rate { display: grid; justify-items: center; gap: 2px; padding: 10px 18px; border-left: 1px solid var(--line); }
.pf-rate b { font-size: 2.4rem; font-weight: 600; line-height: 1; }
.pf-rate small { color: var(--muted); }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.pf-stats li { display: grid; justify-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); text-align: center; }
.pf-stats b { font-size: 1.6rem; font-weight: 600; color: var(--orange); }
.pf-stats span { color: var(--muted); font-size: .85rem; }
.pf-about { padding: 14px 16px; border-radius: 12px; background: var(--surface); color: #ddd; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pf-warnlist { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(251, 191, 36, .4); border-radius: 12px; background: rgba(251, 191, 36, .06); }
.pf-warnlist h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: #fcd34d; }
.pf-warnlist ul { margin: 8px 0 0; padding-left: 18px; }
.pf-warnlist small { display: block; color: var(--muted); }
.rv-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.rv-sum { display: grid; justify-items: center; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.rv-sum > b { font-size: 3rem; font-weight: 600; line-height: 1; }
.rv-sum > small { color: var(--muted); }
.rv-dist { width: 100%; display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; font-size: .82rem; }
.rv-dist li { display: grid; grid-template-columns: 40px 1fr 24px; align-items: center; gap: 6px; color: var(--muted); }
.rv-dist li span:first-child { display: inline-flex; align-items: center; gap: 2px; }
.rv-dist .icon { width: .9em; height: .9em; color: #fbbf24; }
.rv-dist i { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.rv-dist s { display: block; height: 100%; background: #fbbf24; }
.rv-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rv-list li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.rv-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 4px; }
.rv-top small { margin-left: auto; color: var(--muted); }
.rv-list p { color: #ddd; }

/* คำสั่งซื้อ */
.olist { display: grid; gap: 10px; margin: 0 0 40px; padding: 0; list-style: none; }
.ocard { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); text-align: left; cursor: pointer; transition: border-color .2s; }
.ocard:hover { border-color: var(--orange); }
.ocard.has-todo { border-left: 4px solid var(--orange); }
.ocard img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.ocard-main { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.ocard-main b { font-size: 1.05rem; font-weight: 500; }
.ocard-main small { color: var(--muted); font-size: .82rem; }
.ocard-todo { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-2); font-size: .85rem; font-weight: 500; }
.ocard-price { display: grid; justify-items: end; font-size: 1.15rem; font-weight: 600; color: var(--orange); text-align: right; }
.ocard-price small { color: var(--muted); font-size: .72rem; font-weight: 400; }
.od-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-right: 30px; }
.od-head > img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 1.5px solid var(--orange); }
.od-head .eyebrow { text-align: left; font-size: .85rem; }
.od-head h2 { font-size: 1.4rem; margin-bottom: 4px; }
.od-head p { color: var(--muted); }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 14px; padding: 0; list-style: none; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .8rem; color: var(--muted); }
.stepper li::before { content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-now::before { background: var(--orange); }
.stepper i { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-style: normal; font-weight: 600; }
.stepper .is-done i { background: var(--orange); border-color: var(--orange); color: #000; }
.stepper .is-now i { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 0, .2); }
.stepper .is-now, .stepper .is-done { color: var(--text); }
.order-alert { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.order-alert.is-warn { background: rgba(251, 191, 36, .12); color: #fcd34d; }
.order-alert.is-off { background: var(--surface-2); color: #ddd; }
.od-deadline, .od-note, .od-info { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; color: #ddd; }
.od-deadline { background: rgba(37, 99, 235, .14); color: #bfdbfe; }
.od-deadline .icon, .od-note .icon, .od-info .icon { flex: none; margin-top: 2px; color: var(--orange); }
.od-info span { flex: 1; }
.od-info img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.od-money { display: grid; gap: 4px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.od-money div { display: flex; justify-content: space-between; gap: 10px; }
.od-money dt { color: var(--muted); }
.od-money dd { margin: 0; font-weight: 500; }
.od-money .is-total { padding-top: 6px; border-top: 1px dashed var(--line); }
.od-money .is-total dd { color: var(--orange); font-size: 1.15rem; font-weight: 600; }
.od-party { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.od-party > span { flex: 1; display: grid; min-width: 0; line-height: 1.35; }
.od-party small { color: var(--muted); font-size: .8rem; }
.od-party a { color: var(--orange-2); }
.od-dispute { display: flex; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid rgba(251, 191, 36, .45); border-radius: 12px; background: rgba(251, 191, 36, .06); }
.od-dispute > .icon { color: #fbbf24; flex: none; margin-top: 3px; }
.od-dispute p { color: #ddd; margin-top: 2px; }
.od-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.od-imgs img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.od-act { margin: 4px 0 12px; }
.od-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.od-review { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); display: grid; gap: 4px; }
.od-log { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.od-log summary { display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.od-log ol { display: grid; gap: 8px; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); list-style: none; }
.od-log li { display: grid; font-size: .88rem; }
.od-log small { color: var(--muted); font-size: .76rem; }
.pay { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 16px; border: 1.5px solid var(--orange); border-radius: 14px; background: var(--bg-2); }
.pay-qr { display: grid; gap: 6px; justify-items: center; align-content: start; text-align: center; }
.pay-qr img { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; }
.pay-qr small { color: var(--muted); font-size: .76rem; }
.pay-info { display: grid; gap: 8px; align-content: start; }
.pay-info h3 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.pay-info h3 .icon { color: var(--orange); }
.pay-amount { font-size: 2rem; font-weight: 600; color: var(--orange); line-height: 1.1; }
.pay-warn { display: flex; gap: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 138, 0, .1); font-size: .85rem; color: #ddd; }
.pay-warn .icon { color: var(--orange); flex: none; }

/* แชต */
.chat-main { padding-block: 18px 30px; }
.chat-app { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100svh - var(--header-h) - 48px); min-height: 480px; border: 1.5px solid var(--orange); border-radius: 16px; overflow: hidden; background: var(--bg-2); }
.chat-app.is-gate { display: block; height: auto; min-height: 0; border: 0; background: none; }
.ch-side { display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid var(--line); min-height: 0; }
.ch-title { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-size: 1.2rem; border-bottom: 1px solid var(--line); }
.ch-title .icon { color: var(--orange); }
.ch-list { margin: 0; padding: 6px; list-style: none; overflow-y: auto; }
.ch-list .empty { padding: 20px 12px; font-size: .9rem; }
.ch-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; text-decoration: none; }
.ch-item:hover { background: var(--surface); }
.ch-item.is-on { background: var(--surface-2); }
.ch-item .avatar { width: 44px; height: 44px; }
.ch-item-main { display: grid; min-width: 0; line-height: 1.3; }
.ch-item-main b { font-weight: 500; }
.ch-item-main small { color: var(--orange-2); font-size: .76rem; }
.ch-item-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .85rem; }
.ch-item.is-unread .ch-item-main > span { color: var(--text); font-weight: 500; }
.ch-item-side { display: grid; justify-items: end; gap: 4px; }
.ch-item-side small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.ch-item-side i { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #000; font-size: .72rem; font-style: normal; font-weight: 700; }
.ch-room { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ch-empty { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; padding: 30px; color: var(--muted); text-align: center; }
.ch-empty .icon { color: var(--orange); flex: none; }
.ch-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ch-back { display: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.ch-who { flex: 1; display: grid; min-width: 0; text-decoration: none; line-height: 1.3; }
.ch-who small { color: var(--muted); font-size: .8rem; }
.ch-listing { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ch-listing img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.ch-listing span { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.ch-listing small { color: var(--orange); }
.ch-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px; overflow-y: auto; }
.ch-day { align-self: center; margin: 6px 0; padding: 2px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .76rem; }
.ch-msg { position: relative; display: grid; gap: 4px; max-width: min(78%, 460px); padding: 8px 12px 6px; border-radius: 16px; font-size: .95rem; line-height: 1.5; }
.ch-msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-msg img { max-width: 240px; max-height: 240px; border-radius: 10px; object-fit: cover; }
.ch-msg time { justify-self: end; font-size: .68rem; opacity: .7; }
.ch-me { align-self: flex-end; background: var(--orange); color: #000; border-bottom-right-radius: 4px; }
.ch-them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.ch-msg.ch-admin { align-self: center; max-width: 90%; background: rgba(37, 99, 235, .18); border: 1px solid rgba(147, 197, 253, .3); }
b.ch-admin { display: inline-flex; align-items: center; gap: 4px; color: #93c5fd; font-size: .8rem; }
.ch-flag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: #7c2d12; }
.ch-rule { display: flex; align-items: center; gap: 6px; padding: 6px 14px; color: var(--muted); font-size: .76rem; border-top: 1px solid var(--line); }
.ch-rule .icon { color: var(--orange); flex: none; }
.ch-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ch-attach { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); cursor: pointer; flex: none; }
.ch-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ch-attach:focus-within { outline: 3px solid var(--orange-2); }
.ch-input { flex: 1; display: grid; gap: 6px; min-width: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 22px; background: #000; }
.ch-input:focus-within { border-color: var(--orange); }
.ch-input textarea { width: 100%; border: 0; background: none; resize: none; outline: 0; line-height: 1.5; max-height: 120px; }
.ch-preview { position: relative; width: 72px; }
.ch-preview img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.ch-preview button { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.ch-send { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--orange); color: #000; cursor: pointer; flex: none; }

/* กติกา */
.rules { max-width: 900px; padding-bottom: 50px; }
.rules-toc { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.rules-toc a { flex: none; padding: 6px 14px; border: 1px solid var(--orange); border-radius: 999px; color: var(--orange-2); text-decoration: none; font-size: .9rem; }
.rules-toc a:hover { background: var(--orange); color: #000; }
.rules-sec { margin-bottom: 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); scroll-margin-top: calc(var(--header-h) + 16px); }
.rules-sec h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.3rem; }
.rules-sec h2 .icon { color: var(--orange); }
.rules-sec ol, .rules-sec ul { display: grid; gap: 8px; margin: 0; padding-left: 22px; color: #e5e5e5; }
.rules-sec b { color: var(--orange-2); font-weight: 500; }
.rules-note { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 138, 0, .1); font-size: .9rem; color: #ddd; }
.rules-note .icon { color: var(--orange); flex: none; margin-top: 2px; }

/* ----- หลังบ้าน ----- */
.adm { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100svh; }
.adm-login { display: grid; place-items: center; grid-template-columns: 1fr; padding: 20px; background: radial-gradient(circle at 30% 20%, rgba(255, 138, 0, .18), transparent 50%), #000; }
.adm-login-card { display: grid; gap: 14px; width: min(400px, 100%); padding: 28px; border: 1.5px solid var(--orange); border-radius: 18px; background: var(--surface); text-align: center; }
.adm-login-card .logo { justify-items: center; margin: 0 auto; }
.adm-login-card .logo-big .logo-th { font-size: 2.2rem; }
.adm-login-card .logo-big .logo-en { font-size: 2.4rem; }
.adm-login-card h1 { font-size: 1.2rem; color: var(--orange-2); }
.adm-login-card .field { text-align: left; }
.adm-login-card .hint { justify-content: center; }
.adm-back { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: .9rem; }
.adm-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; height: 100svh; padding: 16px 12px; border-right: 1px solid var(--line); background: #050505; }
.adm-logo { display: grid; gap: 2px; padding: 4px 10px 12px; text-decoration: none; font-size: 1.35rem; border-bottom: 1px solid var(--line); }
.adm-logo small { color: var(--orange-2); font-size: .8rem; font-weight: 500; }
.adm-nav { display: grid; gap: 2px; align-content: start; overflow-y: auto; flex: 1; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: #d4d4d4; font-weight: 500; white-space: nowrap; }
.adm-nav a:hover { background: var(--surface); color: #fff; }
.adm-nav a[aria-current] { background: rgba(255, 138, 0, .16); color: var(--orange-2); }
.adm-nav a b { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .75rem; text-align: center; line-height: 20px; }
.adm-side-foot { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.adm-side-foot a, .adm-side-foot button { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--muted); text-decoration: none; text-align: left; font-size: .9rem; cursor: pointer; }
.adm-side-foot a:hover, .adm-side-foot button:hover { background: var(--surface); color: #fff; }
.adm-main { min-width: 0; padding: 20px clamp(16px, 3vw, 32px) 60px; }
.adm-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 18px; }
.adm-top h1 { font-size: 1.7rem; }
.adm-date { color: var(--muted); font-size: .9rem; }
.adm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-tile { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); text-decoration: none; transition: border-color .2s; }
.adm-tile:hover { border-color: var(--orange); }
.adm-tile .icon { color: var(--orange); width: 24px; height: 24px; }
.adm-tile span { color: var(--muted); font-size: .85rem; }
.adm-tile b { font-size: 1.5rem; font-weight: 600; }
.adm-tile.is-good b { color: #4ade80; }
.adm-tile.is-warn b { color: var(--orange-2); }
.adm-card { margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.adm-card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 1.1rem; }
.adm-card h2 .icon { color: var(--orange); }
.adm-todo, .adm-feed, .adm-list, .adm-mini { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.adm-todo a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); text-decoration: none; }
.adm-todo a:hover { background: var(--surface-2); }
.adm-todo .icon:first-child { color: var(--orange); }
.adm-todo span { flex: 1; }
.adm-todo b { min-width: 26px; padding: 0 8px; border-radius: 999px; background: #ef4444; color: #fff; text-align: center; font-size: .85rem; }
.adm-feed li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.adm-feed small { color: var(--muted); }
.adm-feed a { color: var(--orange-2); }
.chips { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .9rem; }
.chips button[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 138, 0, .16); color: var(--orange-2); }
.chips b { padding: 0 6px; border-radius: 999px; background: var(--surface-2); font-size: .75rem; }
.adm-search { display: flex; align-items: center; gap: 8px; max-width: 420px; margin-bottom: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #000; }
.adm-search input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: none; outline: 0; }
.adm-search:focus-within { border-color: var(--orange); }
.adm-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); text-align: left; cursor: pointer; }
.adm-row.no-pic { grid-template-columns: minmax(0, 1fr) auto; }
button.adm-row:hover { border-color: var(--orange); }
.adm-row.is-static { cursor: default; }
.adm-row.is-off { opacity: .55; }
.adm-row > img, .adm-row > .avatar { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.adm-row > .avatar { border-radius: 50%; }
.adm-row-main { display: grid; gap: 2px; min-width: 0; }
.adm-row-main b { font-weight: 500; }
.adm-row-main small { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.adm-row-main a { color: var(--orange-2); }
.adm-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.adm-row-side small { color: var(--muted); font-size: .76rem; }
.adm-row-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.adm-docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.adm-docs figure { margin: 0; display: grid; gap: 4px; }
.adm-docs img, .adm-nopic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.adm-nopic { display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.adm-docs figcaption { color: var(--muted); font-size: .8rem; text-align: center; }
.adm-dl { display: grid; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.adm-dl div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.adm-dl div:last-child { border-bottom: 0; }
.adm-dl dt { color: var(--muted); }
.adm-dl dd { margin: 0; overflow-wrap: anywhere; }
.adm-dl a { color: var(--orange-2); }
.adm-dl small { color: var(--muted); }
.adm-h3 { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 1rem; }
.adm-h3 .icon { color: var(--orange); }
.adm-mini li { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: .88rem; }
.adm-mini small { display: block; color: var(--muted); }
.adm-chat { display: grid; gap: 8px; max-height: 50svh; overflow-y: auto; margin-bottom: 10px; padding: 4px; }
.adm-msg { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.adm-msg small { color: var(--muted); font-size: .76rem; }
.adm-msg img { max-width: 180px; border-radius: 8px; margin: 4px 0; }
.adm-msg.is-flag { border: 1px solid rgba(239, 68, 68, .6); background: rgba(239, 68, 68, .08); }
.adm-msg.is-admin { background: rgba(37, 99, 235, .15); }
.adm-masked { color: var(--muted); font-size: .82rem; }
.adm-chat-form { display: flex; gap: 8px; margin-bottom: 8px; }
.adm-chat-form input { flex: 1; min-width: 0; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #000; outline: 0; }
.adm-chat-form input:focus { border-color: var(--orange); }
.adm-settings .form-row { margin-bottom: 12px; }
.adm-settings .adm-card > .field { margin-bottom: 12px; }
.adm-save { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 18, 18, .96); backdrop-filter: blur(8px); }
.adm-save span { flex: 1; color: var(--muted); font-size: .9rem; }
.adm-settings.is-dirty .adm-save { border-color: var(--orange); }
.adm-settings.is-dirty .adm-save span { color: var(--orange-2); }
.adm-guide details summary { list-style: none; cursor: pointer; }
.adm-guide details summary::-webkit-details-marker { display: none; }
.adm-guide details summary h2 { margin: 0; }
.adm-guide details[open] summary h2 { margin-bottom: 10px; }
.adm-guide ol { display: grid; gap: 6px; margin: 0; padding-left: 22px; color: #e5e5e5; }

@media (max-width: 1000px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(3)::before { display: none; }
  .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side { min-width: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .adm-logo { display: flex; align-items: baseline; gap: 8px; padding: 4px; border: 0; font-size: 1.15rem; }
  .adm-side-foot { display: flex; margin-left: auto; padding: 0; border: 0; }
  .adm-side-foot a, .adm-side-foot button { padding: 8px; font-size: 0; gap: 0; }
  .adm-side-foot .icon { width: 20px; height: 20px; }
  .adm-nav { order: 3; flex: 0 0 100%; display: flex; overflow-x: auto; scrollbar-width: none; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-nav a { flex: none; padding: 8px 12px; }
}
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow li::before { display: none; }
  .pf-head { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 14px; }
  .pf-head .avatar-xl { width: 72px; height: 72px; font-size: 1.8rem; }
  .pf-rate { grid-column: 1 / -1; grid-template-columns: auto auto auto; align-items: center; justify-content: start; gap: 10px; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .pf-rate b { font-size: 1.8rem; }
  .pf-stats b { font-size: 1.3rem; }
  .rv-wrap { grid-template-columns: 1fr; }
  .ocard { grid-template-columns: 56px minmax(0, 1fr); }
  .ocard img { width: 56px; height: 56px; }
  .ocard-price { grid-column: 2; justify-items: start; text-align: left; font-size: 1rem; }
  .pay { grid-template-columns: 1fr; }
  .pay-qr img { max-width: 200px; }
  .stepper li { font-size: .72rem; }
  .od-head > img { width: 64px; height: 64px; }
  .chat-main { padding: 0; }
  .chat-app { grid-template-columns: 1fr; height: calc(100svh - var(--header-h)); min-height: 420px; border-radius: 0; border-width: 0; }
  .chat-app .ch-room { display: none; }
  .chat-app.is-room .ch-side { display: none; }
  .chat-app.is-room .ch-room { display: flex; }
  .ch-back { display: grid; }
  .ch-msg { max-width: 86%; }
  .ch-msg img { max-width: 200px; }
  .adm-row { grid-template-columns: 48px minmax(0, 1fr); }
  .adm-row.no-pic { grid-template-columns: minmax(0, 1fr); }
  .adm-row > img, .adm-row > .avatar { width: 48px; height: 48px; }
  .adm-row-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; }
  .adm-row-acts { justify-content: flex-start; }
  .adm-docs { grid-template-columns: 1fr 1fr; }
  .adm-dl div { grid-template-columns: 1fr; gap: 0; }
  .adm-feed li { grid-template-columns: 1fr; gap: 0; }
  .adm-tiles { gap: 8px; }
  .adm-tile b { font-size: 1.2rem; }
}
@media (max-width: 380px) {
  /* จอแคบมาก: ไก่ที่ถูกใจเปิดจากเมนูบัญชีแทน แถบบนจะได้ไม่ล้น */
  .hdr-tools:has(.hdr-user) [data-favs-open] { display: none; }
}
@media (max-width: 420px) {
  .hdr-lang-btn b { display: none; }
  .hdr-lang-btn { padding: 0; width: 36px; }
  .pf-stats { gap: 6px; }
  .pf-stats li { padding: 8px 4px; }
}
