:root {
  /* สีและฟอนต์ชุดเดียวกับเว็บหลัก munsdeetrader.com (assets/site.css) — ตลาดอยู่ใต้เว็บหลัก ต้องดูเป็นเว็บเดียวกัน */
  --bg: #06161F; --bg-2: #0A2230; --card: rgba(255, 255, 255, .045); --ink: #E9F2F6; --muted: #9FB6C1; --line: rgba(255, 255, 255, .12);
  --accent: #F26A10; --accent-2: #FF8A3D; --accent-ink: #ffffff; --accent-soft: rgba(242, 106, 16, .16);
  --ok: #2FD08A; --ok-soft: rgba(47, 208, 138, .13); --warn: #FFC857; --warn-soft: rgba(255, 200, 87, .12); --bad: #FF5A6E; --bad-soft: rgba(255, 90, 110, .13);
  --info-soft: rgba(27, 155, 215, .13); --radius: 14px; --shadow: none;
  --font: 'Sarabun', system-ui, "Noto Sans Thai", "Noto Sans Lao", "Leelawadee UI", "Phetsarath OT", sans-serif;
  --display: 'Kanit', system-ui, "Noto Sans Thai", "Noto Sans Lao", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
h1, h2, h3, .brand, .nav, button, .btn, .tabs, .kpi .v, .badge { font-family: var(--display); }
h1, h2, h3 { font-weight: 500; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .2em 0 .5em; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .6em; }
h3 { font-size: 1.02rem; margin: 1em 0 .4em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
body { background-image: radial-gradient(1200px 500px at 85% -10%, rgba(27, 155, 215, .10), transparent 60%); background-attachment: fixed; }
main.wrap { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; outline: none; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; word-break: break-all; }

/* header */
.top { background: rgba(6, 22, 31, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand-name { font-weight: 600; letter-spacing: .12em; font-size: 14px; }
.mkt { font-family: var(--display); font-weight: 500; color: var(--accent-2); border: 1px solid rgba(255, 138, 61, .45); border-radius: 999px; padding: 3px 11px; font-size: .86rem; white-space: nowrap; }
.mkt:hover { text-decoration: none; background: var(--accent-soft); }
.search { flex: 1 1 260px; min-width: 0; }
.search input { width: 100%; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button.linkish { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 300; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.active { background: var(--accent-soft); }
.nav select { width: auto; padding: 5px 8px; }

/* forms */
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .04); color: var(--ink); font: inherit; }
select option { background: var(--bg-2); color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: .92rem; }
label.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
label.check input { width: auto; margin-top: 4px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { text-decoration: none; filter: brightness(.97); }
button.primary, .btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 24px rgba(242, 106, 16, .3); }
button.danger { color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(10px); }
.card + .card { margin-top: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; gap: 6px; color: var(--ink); height: 100%; }
.pcard:hover { text-decoration: none; border-color: rgba(255, 138, 61, .55); }
.pcard .title { font-weight: 700; font-size: 1.02rem; }
.pcard .price { margin-top: auto; font-weight: 700; }
.two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* badges & notices */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--info-soft); color: var(--ink); white-space: nowrap; }
.badge.sponsored { background: var(--accent-soft); color: var(--accent-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.notice { padding: 11px 13px; border-radius: 10px; background: var(--info-soft); margin: 10px 0; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.notice.ok { background: var(--ok-soft); }
.stars { color: var(--warn); letter-spacing: 1px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 13px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--accent); font-weight: 700; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 10px 0; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.kpi .v { font-size: 1.15rem; font-weight: 800; }
.kpi .k { color: var(--muted); font-size: .78rem; }
.bars { width: 100%; height: 120px; }
.bars .pos { fill: var(--ok); }
.bars .neg { fill: var(--bad); }
.bars .axis { stroke: var(--line); }
.bars text { fill: var(--muted); font-size: 9px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(140%); background: #E9F2F6; color: #06161F; padding: 10px 16px;
  border-radius: 10px; max-width: min(560px, calc(100vw - 32px)); transition: transform .2s, opacity .2s; z-index: 50; opacity: 0; visibility: hidden; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.toast.bad { background: var(--bad); color: #fff; }
.foot { border-top: 1px solid var(--line); padding: 18px 0 26px; background: rgba(255, 255, 255, .02); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.hero { padding: 22px 0 6px; }
.hero p { color: var(--muted); max-width: 720px; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ฝังในหลังบ้าน MUNSDEE ADMIN */
body.embed { background: transparent; background-image: none; }
body.embed .top, body.embed .foot { display: none; }
body.embed main.wrap { max-width: none; padding: 0 0 20px; min-height: 0; }
body.embed main.wrap > h1 { display: none; }
