/* Fire Point Market (/fire-market) — โหลดเฉพาะหน้าของตลาดนี้ (fp-market-s2-1130) · prefix fpm- */
/* กรอบเท่า .wiki-page (หน้า /market และหน้า wiki อื่น) — เจ้าของ 2 ธ.ค. "กด 2 หน้าแล้วรูปแบบไม่ตรงกัน" (fp-cat-1202) */
.fpm { max-width: 1200px; margin: 0 auto; padding: 20px 16px 64px; }
.fpm-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fpm-nav a { padding: 9px 16px; border: 1px solid #f3cdae; border-radius: 999px; background: #fff; color: #6b3b22; font-size: 14px; font-weight: 700; text-decoration: none; }
.fpm-nav a:hover { border-color: var(--orange); }
/* ยอด FP บนแถบเมนู + หน้ากระเป๋า (fp-wallet-ui-1202) */
.wiki-hero.fpm-banner.has-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
.fpm-fpcard { position: relative; z-index: 1; flex: none; display: grid; gap: 4px; justify-items: center; text-align: center; min-width: 230px; padding: 14px 18px; border: 1px solid rgba(243, 196, 107, .9); border-radius: 16px; background: rgba(255, 252, 246, .92); box-shadow: 0 6px 18px rgba(122, 61, 12, .14); backdrop-filter: blur(4px); }
.fpm-fpcard-k { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #7a3d0c; }
.fpm-fpcard > b { font-size: 28px; line-height: 1.15; color: #3a1c10; font-variant-numeric: tabular-nums; }
.fpm-fpcard > b small { font-size: 15px; color: #a0704f; }
.fpm-fpcard-s { font-size: 13px; color: #85634f; }
.fpm-fpcard .btn { margin-top: 6px; }
.fpm-nav a.fpm-bal { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: #fff7ea; border-color: #f3c46b; color: #7a3d0c; }
.fpm-bal img { width: 20px; height: 20px; }
.fpm-bal b { font-variant-numeric: tabular-nums; }
.fpm-bal small { font-size: 12px; font-weight: 600; color: #a0704f; }
.fpm-purse small { display: block; margin-top: 4px; font-size: 13px; color: #85634f; line-height: 1.45; }
.fpm-histhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fpm-histhead h2 { margin: 0; }
.fpm-seg { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid #f3cdae; border-radius: 999px; background: #fffaf5; }
.fpm-seg a { padding: 6px 14px; border-radius: 999px; color: #6b3b22; font-size: 14px; font-weight: 700; text-decoration: none; }
.fpm-seg a.on { background: var(--orange-dark); color: #fff; }
.fpm-nav a.active { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }
.fpm h1 { margin: 0 0 10px; font-size: 26px; color: #4a1f10; text-wrap: balance; }
.fpm h2 { margin: 0 0 12px; font-size: 18px; color: #4a1f10; }
.fpm-lead { margin: 0 0 16px; color: #6b4a38; font-size: 15px; line-height: 1.65; max-width: 70ch; }
/* แถบหัวยาวหน้ารายการ (fp-cat-1202) — ใช้ .wiki-hero ของ site-nav.css · ภาพตลาด 16:9 ขยายให้เห็นแต่ตัวละครฝั่งขวา (ซ่อนโลโก้ในภาพ) */
.wiki-hero.fpm-banner { --sec-art: url('/img/fire-market/market.webp'); }
.fpm .wiki-hero-copy h1 { margin: 6px 0; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.22; color: var(--ink); text-wrap: wrap; } /* ไม่ให้ .fpm h1 (26px) ทับหัวแบบ /market */
.wiki-hero.fpm-banner-how { --sec-art: url('/img/fire-market/how.webp'); }
.wiki-hero.fpm-banner::after { background-size: 190% auto; background-position: 100% 36%; }
.fpm-box { padding: 20px; border: 1px solid #f5d3b8; border-radius: 14px; background: #fff; margin-bottom: 16px; }
.fpm-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.fpm-filter input[type="search"] { flex: 1 1 240px; min-width: 0; }
.fpm input[type="search"], .fpm input[type="text"], .fpm input[type="date"], .fpm select, .fpm textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid #ecc9a9; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: var(--ink);
}
.fpm-filter select { width: auto; flex: 0 1 auto; }
.fpm input:focus-visible, .fpm select:focus-visible, .fpm textarea:focus-visible, .fpm a:focus-visible, .fpm button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.fpm-count { margin: 0 0 10px; font-size: 14px; color: #7a5a47; }

.fpm-list { display: grid; gap: 8px; }
.fpm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid #f5dcc7; border-radius: 12px; background: #fff; }
.fpm-row:hover { border-color: #f0a873; }
.fpm-item { display: flex; gap: 12px; align-items: center; min-width: 0; }
.fpm-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #fff4e8; }
.fpm-ico img { max-width: 36px; max-height: 36px; }
.fpm-ico b { font-size: 20px; color: #b7791f; }
.fpm-name { min-width: 0; }
.fpm-name strong { display: block; color: #3a1c10; font-size: 16px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.fpm-name small { display: block; margin-top: 4px; color: #85634f; font-size: 13px; overflow-wrap: anywhere; }
/* ป้ายของรายการ (fp-listux-1202): จำนวน / ยกชุด · ตีบวก · การ์ดทีละช่อง — ช่องว่าง (เส้นประ) กับ ไม่มีข้อมูลการ์ด (สีเหลือง) ต้องดูต่างกันชัด */
.fpm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 0; padding: 0; list-style: none; }
.fpm-tags li { max-width: 100%; padding: 2px 8px; border: 1px solid transparent; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.fpm-tags li.is-card { background: #eef4ff; color: #2b4a8b; }
.fpm-tags li.is-deal { background: #e3f7eb; color: #17683f; }
.fpm-tags li.is-empty { background: #fff; border: 1px dashed #b6c2d2; color: #64748b; }
.fpm-tags li.is-nodata { background: #fff3e2; border-color: #f0c98a; color: #8a5200; }
.fpm-price { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fpm-price small { display: block; font-size: 12px; color: #85634f; }
.fpm-price b { display: block; font-size: 19px; line-height: 1.25; color: #c24a00; }
.fpm-price em { display: block; font-style: normal; font-size: 13px; font-weight: 600; color: #7a4a33; }
.fpm-price span { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; color: #7a4a33; }
.fpm-price span img { width: 18px; height: 18px; }
.fpm-empty { padding: 36px 16px; border: 1px dashed #ecc9a9; border-radius: 12px; text-align: center; color: #7a5a47; background: #fffaf5; }
.fpm-empty strong { display: block; color: #4a1f10; margin-bottom: 4px; }
.fpm-pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.fpm-pages a, .fpm-pages b { min-width: 40px; padding: 8px 10px; text-align: center; border-radius: 8px; border: 1px solid #f3cdae; text-decoration: none; color: #6b3b22; background: #fff; }
.fpm-pages b { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }

.fpm-2col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.fpm-big { display: flex; gap: 16px; align-items: flex-start; }
.fpm-big .fpm-ico { width: 72px; height: 72px; }
.fpm-big .fpm-ico img { max-width: 60px; max-height: 60px; }
.fpm-desc { margin: 14px 0 0; padding: 14px; border-radius: 10px; background: #fff8f1; font-size: 14px; line-height: 1.6; color: #55392a; }
.fpm-desc ul { margin: 6px 0 0; padding-left: 20px; }
.fpm-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 15px; }
.fpm-kv dt { color: #85634f; }
.fpm-kv dd { margin: 0; text-align: right; font-weight: 700; color: #3a1c10; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fpm-total { margin: 14px 0; padding-top: 14px; border-top: 1px solid #f5dcc7; display: flex; justify-content: space-between; align-items: baseline; }
.fpm-total b { font-size: 26px; color: #c24a00; font-variant-numeric: tabular-nums; }
.fpm-form { display: grid; gap: 12px; }
.fpm-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: #55392a; }
.fpm-form label.fpm-check { grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-weight: 500; line-height: 1.55; align-items: start; }
.fpm-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange); }
.fpm-form .btn { width: 100%; }
.fpm-left { margin: 0; font-size: 14px; color: #6b4a38; font-variant-numeric: tabular-nums; }
.fpm-form + .fpm-total, .fpm-why + .fpm-total, .btn + .fpm-total { margin-top: 22px; }
.fpm-purse { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.fpm-purse div { padding: 16px 18px; border: 1px solid #f5d3b8; border-radius: 14px; background: #fff; }
.fpm-purse span { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #6b4a38; }
.fpm-purse span img { width: 24px; height: 24px; }
.fpm-purse b { display: block; margin-top: 4px; font-size: 28px; color: #3a1c10; font-variant-numeric: tabular-nums; }
.fpm-table { width: 100%; border-collapse: collapse; font-size: 14px; color: #55392a; }
.fpm-table th { padding: 8px 10px; text-align: left; font-size: 13px; color: #85634f; border-bottom: 1px solid #f5dcc7; white-space: nowrap; }
.fpm-table td { padding: 9px 10px; border-bottom: 1px solid #f9eadd; vertical-align: top; overflow-wrap: anywhere; }
.fpm-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fpm-table .plus { color: #17683f; font-weight: 700; }
.fpm-table .minus { color: #a12b2b; font-weight: 700; }
.fpm-scroll { overflow-x: auto; }
.fpm-why { padding: 12px 14px; border-radius: 10px; background: #fff3e2; color: #7a3d0c; font-size: 14px; font-weight: 600; line-height: 1.55; }
.fpm-warn { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #fdecec; color: #8f2424; font-size: 14px; line-height: 1.6; }
.fpm-state { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #f1f5f9; color: #475569; white-space: nowrap; }
.fpm-state.is-wait { background: #fff0d6; color: #8a5200; }
.fpm-state.is-warn { background: #fdecec; color: #a12b2b; }
.fpm-state.is-ok { background: #e3f7eb; color: #17683f; }
.fpm-pay { padding: 16px; border-radius: 12px; background: #fff8ec; border: 1px solid #f3c46b; margin-bottom: 14px; }
.fpm-pay .fpm-no { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; font-size: 24px; font-weight: 800; color: #3a1c10; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.fpm-copy { padding: 6px 12px; border: 1px solid #e0a45a; border-radius: 8px; background: #fff; color: #7a3d0c; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fpm-timer { font-weight: 800; color: #a12b2b; font-variant-numeric: tabular-nums; }
.fpm-slip { display: block; max-width: 100%; max-height: 420px; border-radius: 10px; border: 1px solid #f0d5bf; }
.fpm-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: #55392a; }
.fpm-log li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; }
.fpm-log time { color: #85634f; font-variant-numeric: tabular-nums; }
.fpm-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.65; color: #55392a; }
.fpm details { border-top: 1px solid #f5dcc7; padding-top: 12px; margin-top: 4px; }
.fpm summary { cursor: pointer; font-weight: 700; color: #7a3d0c; font-size: 14px; }
.fpm details[open] summary { margin-bottom: 12px; }
.fpm .alert { margin-bottom: 14px; }

@media (max-width: 820px) { .fpm-2col { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .wiki-hero.fpm-banner.has-card { flex-direction: column; align-items: stretch; }
  .fpm-fpcard { min-width: 0; }
  .wiki-hero.fpm-banner { --sec-art: url('/img/fire-market/market-720.webp'); }
  .wiki-hero.fpm-banner-how { --sec-art: url('/img/fire-market/how-720.webp'); }
  .wiki-hero.fpm-banner::after { background-size: cover; background-position: 85% 40%; }
}
@media (max-width: 620px) {
  .fpm-nav a.fpm-bal { margin-left: 0; }
  .fpm-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .fpm-row .btn { grid-column: 1 / -1; }
  /* แถวของที่ขาย (fp-listux-1202): ชื่อ + ป้ายเต็มความกว้าง · ราคารวมซ้าย ปุ่มขวา ในบรรทัดถัดไป — ชื่อยาวไม่เบียดราคา */
  .fpm-row > .fpm-item { grid-column: 1 / -1; align-items: flex-start; }
  .fpm-row > .fpm-price { text-align: left; white-space: normal; }
  .fpm-row > .fpm-price + a.btn { grid-column: 2; align-self: center; }
  .fpm-filter .btn { width: 100%; }
  .fpm-filter select { flex: 1 1 30%; }
  .fpm-box { padding: 16px; }
  .fpm-log li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* สมุดบัญชีบนมือถือ: แถวละ 2 บรรทัด แทนตาราง 5 คอลัมน์ */
  .fpm-table thead { display: none; }
  .fpm-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid #f9eadd; }
  .fpm-table td { padding: 0; border: 0; }
  .fpm-table td:empty { display: none; }
  .fpm-table td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 13px; color: #85634f; }
  .fpm-table td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .fpm-table td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .fpm-table td:nth-child(4) { grid-column: 2; grid-row: 2; font-size: 13px; }
  .fpm-table td:nth-child(5) { display: none; }
  .fpm-table td:nth-child(4)::before { content: 'พัก '; font-weight: 500; color: #85634f; }
}
.fpm-left { margin: 4px 0 12px; padding: 12px 14px; border: 1px dashed #d99a63; border-radius: 10px; background: #fffaf5; color: #4a1f10; font-weight: 700; line-height: 1.6; }
.fpm-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.fpm-shots:empty { display: none; }
.fpm-shots figure { margin: 0; font-size: 13px; color: #7a3d0c; }
.fpm-shots img { display: block; width: 100%; border-radius: 10px; border: 1px solid #f5d3b8; margin-bottom: 6px; }
/* ปุ่มคัดลอกไปโพสต์ + กล่องตัวอย่างข้อความ หน้ารายการของฉัน (fp-sharepost-1202) · margin: auto = กลางจอ (style.css ล้าง margin ของทุก element) */
.fpm-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.fpm-share { margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 18px; border: 1px solid #f5d3b8; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 18px 48px rgba(58, 28, 16, .28); overflow-y: auto; }
.fpm-share::backdrop { background: rgba(40, 20, 10, .55); }
.fpm-share-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.fpm .fpm-share-head h2 { margin: 0; }
.fpm-share-x { flex: none; padding: 6px 14px; border: 1px solid #ecc9a9; border-radius: 999px; background: #fff; color: #6b3b22; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fpm-share-what { margin: 0 0 12px; font-size: 14px; color: #6b4a38; overflow-wrap: anywhere; }
.fpm-share .fpm-why { margin: 0 0 12px; }
.fpm-seg button { padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: #6b3b22; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fpm-seg button[aria-pressed="true"] { background: var(--orange-dark); color: #fff; }
.fpm-share-hint { margin: 10px 0; font-size: 13px; line-height: 1.55; color: #85634f; }
.fpm-share-part { margin-bottom: 12px; }
.fpm-share-part > b { display: block; margin-bottom: 6px; font-size: 13px; color: #7a3d0c; }
.fpm-share-part textarea { display: block; min-height: 96px; max-height: 44vh; resize: vertical; line-height: 1.55; background: #fffaf5; overflow-wrap: anywhere; }
.fpm-share-act { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.fpm-share-n { font-size: 13px; color: #85634f; font-variant-numeric: tabular-nums; }
.fpm-share-done { min-height: 22px; margin: 4px 0 0; font-size: 14px; font-weight: 700; line-height: 1.55; color: #17683f; }
.fpm-share-done.is-warn { color: #8a5200; }
@media (max-width: 620px) {
  .fpm-acts { grid-column: 1 / -1; justify-content: space-between; }
  .fpm-share { padding: 14px; }
}
/* ---------- หน้ารายการ: คุณสมบัติชิ้นที่ขาย / ข้อมูลพื้นฐาน / ตรวจทานก่อนจอง (fp-listux-1202) ---------- */
.fpm-src { margin: -6px 0 12px; font-size: 13px; line-height: 1.55; color: #85634f; }
.fpm-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 15px; line-height: 1.55; }
.fpm-facts dt { color: #85634f; }
.fpm-facts dd { margin: 0; color: #3a1c10; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fpm-slots { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fpm-slots li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding: 7px 10px; border: 1px solid #f1e0d0; border-radius: 8px; background: #fffaf5; }
.fpm-slots li > span { flex: none; min-width: 48px; font-size: 13px; color: #85634f; }
.fpm-slots li i { font-style: normal; font-weight: 700; }
.fpm-slots li small { flex: 1 1 100%; font-size: 12px; color: #85634f; }
.fpm-slots li.is-empty { border-style: dashed; border-color: #b6c2d2; background: #fff; }
.fpm-slots li.is-empty i { color: #64748b; }
.fpm-slots li.is-unknown { border-color: #f0c98a; background: #fff3e2; }
.fpm-slots li.is-unknown i { color: #8a5200; }
.fpm-desc > b { display: block; margin-bottom: 4px; }
.fpm-more { margin: 12px 0 0; font-size: 14px; }
.fpm-unit { margin: -8px 0 12px; text-align: right; font-size: 14px; font-weight: 700; color: #7a4a33; font-variant-numeric: tabular-nums; }
.fpm-kv-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #fff8f1; font-size: 14px; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.fpm-kv-note dt { font-size: 13px; }
.fpm-kv-note dd { margin: 0 0 8px; text-align: left; font-weight: 600; line-height: 1.55; }
.fpm-kv-note dd:last-child { margin-bottom: 0; }
.fpm-hint { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: #85634f; }
.fpm-review { padding: 12px 14px; border: 1.5px solid #f0a873; border-radius: 12px; background: #fffaf5; }
.fpm-review > b { display: block; margin-bottom: 8px; font-size: 14px; color: #7a3d0c; }
.fpm-review .fpm-kv { font-size: 14px; gap: 6px 12px; }
.fpm-review [data-fpm-dest] { color: #c24a00; font-size: 16px; }
.fpm-goods { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #f5dcc7; align-items: flex-start; }
.fpm-unitnote { margin: 0 0 12px; }
.fpm-gone strong { font-size: 18px; }
.fpm-jump { display: none; }
@media (max-width: 620px) {
  .fpm-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .fpm-facts dt { font-size: 13px; margin-top: 8px; }
  .fpm-facts dt:first-child { margin-top: 0; }
  .fpm-big { gap: 12px; }
}
@media (max-width: 820px) {
  .fpm-jump { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: baseline; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #f5dcc7; font-size: 14px; color: #55392a; }
  .fpm-jump b { font-size: 18px; color: #c24a00; font-variant-numeric: tabular-nums; }
  .fpm-jump a { font-weight: 700; }
  .fpm-big .fpm-ico { width: 56px; height: 56px; }
}
