/* Listing detail — /listings/{uuid}. last13's product page (shop band,
 * per-game spec tabs, buy-now, review summary, suggestion strip) on the
 * theme-v2 tokens. Every class is sf-listing-*. Markup:
 * storefront/listing + storefront/listing/*. Behaviour: js/pkg-listing.js. */

/* ---------- Shop-review notice ---------- */
.sf-listing-notice { display: flex; gap: 12px; align-items: flex-start; margin: -4px 0 22px; }
.sf-listing-notice > .icon { flex: 0 0 20px; width: 20px; height: 20px; color: #ffcf00; margin-top: 1px; }
.sf-listing-notice b { display: block; font-size: 13px; color: #ffe27a; margin-bottom: 2px; }
.sf-listing-notice span { color: #e8dcae; line-height: 1.7; }

/* ---------- Gallery: the stage is the zoom button ---------- */
.sf-listing-stage { width: 100%; color: inherit; font: inherit; cursor: zoom-in; }
.sf-listing-stage:focus-visible { outline: 1px solid var(--v2-accent); outline-offset: 3px; }
.sf-listing-zoomhint { position: absolute; right: 14px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; font-size: 11px; color: var(--v2-muted); background: #0a0014b3; border: 1px solid #ffffff1f; opacity: 0; transition: opacity .2s; pointer-events: none; }
.sf-listing-zoomhint .icon { width: 13px; height: 13px; color: var(--v2-accent); }
.sf-listing-stage:hover .sf-listing-zoomhint, .sf-listing-stage:focus-visible .sf-listing-zoomhint { opacity: 1; }
@media (hover: none) { .sf-listing-zoomhint { opacity: 1; } }

/* ---------- Title + meta ---------- */
.sf-listing-main { min-width: 0; }
.sf-listing-title { overflow-wrap: anywhere; }
.sf-listing-code { display: inline-block; margin: 0 10px 6px 0; padding: 5px 9px; vertical-align: middle; font: 700 .5em/1 var(--v2-mono); letter-spacing: 1px; color: var(--v2-accent); border: 1px solid #00f0ff66; background: #00f0ff0d; }
.sf-listing-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -4px 0 14px; font-size: 13px; color: var(--v2-muted); }
.sf-listing-meta b { color: var(--v2-text); font-family: var(--v2-mono); }
.sf-listing-meta > * + *::before { content: ''; display: inline-block; width: 1px; height: 13px; margin-right: 16px; vertical-align: -2px; background: #ffffff33; }
.sf-listing-meta-rate { display: inline-flex; align-items: center; gap: 5px; }
.sf-listing-meta-rate .icon { width: 14px; height: 14px; color: #ffcf00; fill: currentColor; }
.sf-listing-meta-rate:hover b { color: var(--v2-accent); }

/* ---------- Buy box ---------- */
.sf-listing-soldout { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 700; color: #ff5c9d; }
.sf-listing-soldout .icon { width: 17px; height: 17px; }
.sf-buy .sf-qty button:disabled { color: #ffffff38; cursor: not-allowed; background: transparent; }
.sf-buy .button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.sf-buy .button.is-busy { opacity: .7; pointer-events: none; }
.sf-listing-fav { position: static; width: 50px; height: 50px; border: 1px solid #ffffff2e; opacity: 1; transform: none; }
.sf-listing-fav .icon { width: 19px; height: 19px; }
.sf-listing-subhead { margin: 18px 0 10px; font: 700 12px/1.3 'Noto Sans Thai', sans-serif; color: var(--v2-muted); }

/* ---------- Shop band ---------- */
.sf-listing-shop-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.sf-listing-shop-logo { font-size: 20px; font-weight: 800; color: var(--v2-accent); overflow: hidden; }
.sf-listing-shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.sf-listing-shop-id { min-width: 0; }
.sf-listing-shop-id h3 { font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.sf-listing-shop-id h3 a:hover { color: var(--v2-accent); }
.sf-listing-shop-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; font-size: 11px; }
.sf-listing-shop-go { font-size: 12px; white-space: nowrap; }
.sf-listing-shop-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0 14px; background: #ffffff05; border: 1px solid var(--v2-line); }
.sf-listing-shop-stats > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 10px 12px; min-width: 0; }
.sf-listing-shop-stats > div + div { border-left: 1px solid var(--v2-line); }
.sf-listing-shop-stats > .is-wide { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; border-left: 0; border-top: 1px solid var(--v2-line); }
.sf-listing-shop-stats dt { font-size: 11px; color: var(--v2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-listing-shop-stats dd { margin: 0; display: flex; align-items: center; gap: 4px; font: 700 17px/1.25 var(--v2-mono); color: var(--v2-text); white-space: nowrap; }
.sf-listing-shop-stats dd small { font: 400 11px 'Noto Sans Thai', sans-serif; color: var(--v2-muted); }
.sf-listing-shop-stats dd .icon { width: 14px; height: 14px; color: #ffcf00; fill: currentColor; }
.sf-listing-shop-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sf-listing-shop-search { width: 100%; min-width: 0; }
.sf-listing-shop-search .sf-input { min-height: 40px; }
.sf-listing-shop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.sf-listing-shop-actions .button { gap: 8px; justify-content: center; }
.sf-listing-shop-actions .button .icon { width: 16px; height: 16px; }
.sf-listing-report { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 11px; color: var(--v2-muted); }
.sf-listing-report .icon { width: 13px; height: 13px; }
.sf-listing-report:hover { color: var(--v2-pink); }

/* ---------- Details + language tabs ---------- */
.sf-listing-lang { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--v2-line); }
.sf-listing-langtabs { margin-bottom: 16px; }
.sf-listing-langpanel[hidden] { display: none; }
.sf-listing-spec { display: grid; gap: 14px; }
.sf-listing-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.sf-listing-tiles > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 12px 8px 10px; text-align: center; background: linear-gradient(180deg, #00f0ff14, #00f0ff03); border: 1px solid #00f0ff38; }
.sf-listing-tiles b { font: 700 20px/1.1 var(--v2-mono); color: var(--v2-accent); overflow-wrap: anywhere; }
.sf-listing-tiles small { font-size: 11px; color: var(--v2-muted); }
.sf-listing-rows { font-size: 13px; }
.sf-listing-rows dd { overflow-wrap: anywhere; }
.sf-listing-block { padding: 12px 14px 12px 16px; background: #ffffff05; border-left: 3px solid #00f0ff66; }
.sf-listing-block h4 { margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--v2-accent); }
.sf-listing-block.is-trigger { border-left-color: #ffcf0099; }
.sf-listing-block.is-trigger h4 { color: #ffcf00; }
.sf-listing-block.is-inherit, .sf-listing-block.is-ability { border-left-color: #3ee8a099; }
.sf-listing-block.is-inherit h4, .sf-listing-block.is-ability h4 { color: #3ee8a0; }
.sf-listing-block.is-flavor { border-left-color: #ffffff33; }
.sf-listing-block.is-flavor h4 { color: var(--v2-muted); }
.sf-listing-block.is-flavor .sf-effect { font-style: italic; color: #bdb3cc; }
.sf-listing-block .sf-effect p + p { margin-top: 6px; }
.sf-listing-atk { padding: 12px 14px; border: 1px solid #ffffff1f; background: #ffffff04; }
.sf-listing-atk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.sf-listing-atk-head b { flex: 1 1 auto; font-size: 14px; }
.sf-listing-atk-head em { font: 700 17px var(--v2-mono); font-style: normal; color: var(--v2-accent); }
.sf-listing-atk-cost { display: inline-flex; align-items: center; gap: 3px; }
.sf-listing-tiles .sf-cards-mana { height: .9em; width: .9em; }   /* effect icons: CardFacts::fmt + pkg-cards.css */
.sf-listing-notes { margin-top: 18px; padding: 12px 14px 12px 16px; background: #ffcf0008; border-left: 3px solid #ffcf0080; }
.sf-listing-notes h3 { margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #ffcf00; }
.sf-listing-notes p { font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Reviews ---------- */
.sf-listing-reviews { scroll-margin-top: 150px; }
.sf-listing-stars { display: inline-flex; gap: 2px; }
.sf-listing-stars .icon { width: 15px; height: 15px; color: #ffffff2e; }
.sf-listing-stars .icon.is-on { color: #ffcf00; fill: currentColor; }
.sf-listing-stars.is-sm .icon { width: 12px; height: 12px; }
.sf-listing-rvsum { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; align-items: center; padding: 18px 20px; margin-bottom: 18px; background: #ffcf0008; border: 1px solid #ffcf0033; }
.sf-listing-rvavg { display: grid; justify-items: center; gap: 6px; padding-right: 28px; border-right: 1px solid var(--v2-line); }
.sf-listing-rvavg b { font: 700 40px/1 var(--v2-mono); color: #ffcf00; }
.sf-listing-rvavg small { font-size: 12px; color: var(--v2-muted); }
.sf-listing-rvbars { display: grid; gap: 6px; }
.sf-listing-rvbars > div { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: 12px; color: var(--v2-muted); }
.sf-listing-rvbars span { display: inline-flex; align-items: center; gap: 3px; font-family: var(--v2-mono); }
.sf-listing-rvbars span .icon { width: 11px; height: 11px; color: #ffcf00; fill: currentColor; }
.sf-listing-rvbars i { height: 8px; background: #ffffff14; overflow: hidden; }
.sf-listing-rvbars em { display: block; height: 100%; background: #ffcf00; }
.sf-listing-rvbars small { text-align: right; font-family: var(--v2-mono); }
.sf-listing-rvlist { display: grid; }
.sf-listing-rv { padding: 16px 0; border-top: 1px solid var(--v2-line); }
.sf-listing-rv:first-child { border-top: 0; padding-top: 0; }
.sf-listing-rv header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sf-listing-rv header > div { display: grid; gap: 2px; min-width: 0; }
.sf-listing-rv header b { font-size: 13px; }
.sf-listing-rv time { margin-left: auto; font-size: 11px; color: var(--v2-muted); white-space: nowrap; }
.sf-listing-rv-av { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--v2-accent); background: #00f0ff12; border: 1px solid #00f0ff38; }
.sf-listing-rv p { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.sf-listing-rv-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sf-listing-rv-photos a { width: 64px; height: 64px; border: 1px solid #ffffff24; overflow: hidden; background: var(--v2-surface-2); }
.sf-listing-rv-photos img { width: 100%; height: 100%; object-fit: cover; }
.sf-listing-rvempty { display: grid; justify-items: center; gap: 6px; padding: 34px 16px; text-align: center; border: 1px dashed #ffcf0040; background: #ffcf0006; }
.sf-listing-rvempty .sf-listing-stars .icon { width: 18px; height: 18px; color: #ffcf0055; }
.sf-listing-rvempty b { font-size: 14px; }
.sf-listing-rvempty small { font-size: 12px; color: var(--v2-muted); }

/* ---------- Suggestion strip ---------- */
.sf-listing-sim { position: relative; }
.sf-listing-sim-track { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px; }
.sf-listing-sim-track::-webkit-scrollbar { display: none; }
.sf-listing-sim-card { position: relative; scroll-snap-align: start; background: var(--v2-surface); border: 1px solid #ffffff1a; transition: border-color .2s, transform .2s; }
.sf-listing-sim-card:hover { border-color: #00f0ff66; transform: translateY(-3px); }
.sf-listing-sim-shop { position: absolute; top: 8px; left: 8px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 800; color: var(--v2-accent); background: #0d0719; border: 1px solid #00f0ff59; }
.sf-listing-sim-shop img { width: 100%; height: 100%; object-fit: cover; }
.sf-listing-sim-shop:hover { border-color: var(--v2-accent); box-shadow: 0 0 12px #00f0ff55; }
.sf-listing-sim-link { display: flex; flex-direction: column; height: 100%; }
.sf-listing-sim-art { display: grid; place-items: center; aspect-ratio: 4 / 4.6; padding: 14px; background: radial-gradient(circle at 50% 40%, #00f0ff14, transparent 65%), #10091a; }
.sf-listing-sim-art img { max-height: 100%; max-width: 82%; object-fit: contain; filter: drop-shadow(0 12px 16px #000b); }
.sf-listing-sim-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; padding: 10px 12px 0; font-size: 12px; line-height: 1.45; }
.sf-listing-sim-name b { font: 700 11px var(--v2-mono); color: #cfc4df; }
.sf-listing-sim-card:hover .sf-listing-sim-name { color: var(--v2-accent); }
.sf-listing-sim-foot { display: grid; gap: 2px; margin-top: auto; padding: 8px 12px 12px; }
.sf-listing-sim-foot b { font: 700 15px var(--v2-mono); color: var(--v2-accent); }
.sf-listing-sim-foot small { font-size: 11px; color: var(--v2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-listing-sim-arrow { position: absolute; top: 38%; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; color: var(--v2-accent); background: #0a0014e6; border: 1px solid #00f0ff66; }
.sf-listing-sim-arrow:hover { background: var(--v2-accent); color: var(--v2-bg); }
.sf-listing-sim-arrow .icon { width: 17px; height: 17px; }
.sf-listing-sim-arrow.is-prev { left: -12px; }
.sf-listing-sim-arrow.is-prev .icon { transform: scaleX(-1); }
.sf-listing-sim-arrow.is-next { right: -12px; }
.sf-listing-sim-arrow[hidden] { display: none; }

@media (max-width: 1080px) {
  .sf-listing-shop-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .sf-listing-code { font-size: 13px; }
  .sf-buy-row { gap: 10px; }
  .sf-buy-row .sf-qty { order: 0; }
  .sf-buy-row .sf-listing-fav { order: 1; margin-left: auto; }
  .sf-buy-row [data-add], .sf-buy-row [data-listing-buynow] { order: 2; flex: 1 1 calc(50% - 5px); justify-content: center; gap: 10px; padding-inline: 12px; }
  .sf-listing-shop-head { grid-template-columns: 48px minmax(0, 1fr); }
  .sf-listing-shop-head .sf-shop-logo { width: 48px; height: 48px; }
  .sf-listing-shop-go { grid-column: 1 / -1; justify-self: start; padding: 0; }
  .sf-listing-shop-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-listing-shop-stats > div:nth-child(3) { border-left: 0; }
  .sf-listing-shop-stats > div:nth-child(n + 3) { border-top: 1px solid var(--v2-line); }
  .sf-listing-report { margin-left: 0; }
  .sf-listing-rvsum { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .sf-listing-rvavg { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--v2-line); }
  .sf-listing-sim-track { grid-auto-columns: 150px; gap: 10px; }
  .sf-listing-sim-arrow { display: none; }
  .sf-listing-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- ขายเด็ค (2026-10-09): a deck sold as one item ----------
   listing._deck = the cards by tab (the /decks/view spread + zoom, pkg-decks), the rules line,
   the text list; .sf-deck-value = what the cards would cost one by one (an honest "≈"). */
.sf-deck-value h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 800 15px/1.3 'Noto Sans Thai', sans-serif; color: var(--sf-heading, #fff); }
.sf-deck-value h2 .icon { width: 18px; height: 18px; color: var(--sf-price, #ffd24a); }
.sf-deck-value-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.sf-deck-value-row span { color: var(--sf-text, #e9e3ff); }
.sf-deck-value-row b { font-size: 22px; }
.sf-deck-value-save { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 4px 10px; color: #2ee59d; background: #2ee59d14; border: 1px solid #2ee59d44; font-weight: 700; font-size: 14px; }
.sf-deck-value-save .icon { width: 15px; height: 15px; }
.sf-deck-value .sf-note { margin-top: 10px; }

.sf-deck-sale .section-heading h2 b { color: var(--v2-accent, #00f0ff); }
.sf-deck-sale .sf-decks-rules-view .sf-note { padding: 0 10px 10px; margin: 0; }
.sf-deck-sale-zone { padding: 10px 2px 4px; font: 800 12px/1.3 'Noto Sans Thai', sans-serif; letter-spacing: .04em; color: var(--sf-muted, #a99cc8); border-bottom: 1px solid var(--v2-line, #ffffff1a); }
@media (max-width: 680px) {
  .sf-deck-sale .section-heading { flex-wrap: wrap; }
}

/* ---------- ขายเด็ค: show it is a DECK (2026-10-09, owner: "ทำอย่างไรให้รู้ว่าเป็นเด็คดี", "ทำรายละเอียดให้สวยกว่านี้
   อาจใส่กรอบ") ----------
   Stage (.sf-listing-stage.is-deck): while the cover card shows (.is-cover) it is held in front of a hand of the deck's
   own cards (.sf-deck-fan, rotated round a point under the card — --r per card from the view; hover opens the hand a
   little); a shop photo (a thumb) is the deck itself and shows alone. The "เด็คพร้อมเล่น n ใบ" plate sits bottom-left
   either way. Under the title, .sf-deck-glance = every kind in the deck + its make-up + rules state, one link down to
   the board. The board is /decks/view's notched frame (.sf-decks-board, pkg-decks.css) with the rules box on top. */
.sf-listing-stage.is-deck.is-cover > img[data-gallery-main], .sf-deck-fan { grid-area: 1 / 1; width: min(48%, 320px); }
.sf-listing-stage.is-deck > img[data-gallery-main] { position: relative; z-index: 1; grid-area: 1 / 1; }
.sf-deck-fan { position: relative; z-index: 0; aspect-ratio: 600 / 838; pointer-events: none; }
.sf-listing-stage:not(.is-cover) .sf-deck-fan { display: none; }
.sf-listing-stage .sf-deck-fan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto;
  transform-origin: 50% 115%; transform: rotate(var(--r, 0deg)); filter: brightness(.62) saturate(.85) drop-shadow(0 16px 20px #000b);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .35s; }
@media (hover: hover) and (pointer: fine) {
  .sf-listing-stage.is-cover:hover .sf-deck-fan img { transform: rotate(calc(var(--r, 0deg) * 1.22)); filter: brightness(.78) saturate(.95) drop-shadow(0 18px 22px #000b); }
}
.sf-deck-badge { --n: 10px; position: absolute; left: 16px; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px;
  color: #ff2e8899; background: var(--sf-diag) right top / var(--n) var(--n) no-repeat, #0a0014e0; border: 1px solid currentColor; box-shadow: 0 10px 24px #000a;
  clip-path: polygon(0 0, calc(100% - var(--n)) 0, 100% var(--n), 100% 100%, 0 100%); pointer-events: none; }
.sf-deck-badge > .icon { width: 34px; height: 34px; padding: 8px; flex: none; color: #fff; background: var(--sf-heading-mark, #ff2e88); box-shadow: 0 0 14px #ff2e8866; }
.sf-deck-badge > span { display: grid; line-height: 1.15; font-size: 13px; color: var(--sf-text, #f4f0ff); }
.sf-deck-badge small { font: 800 11px/1.3 'Noto Sans Thai', sans-serif; letter-spacing: .04em; color: var(--sf-eyebrow, #ff7ab3); }
.sf-deck-badge b { display: inline; margin-right: 4px; font-size: 22px; color: #fff; }
.sf-deck-badge-n { white-space: nowrap; }

.sf-deck-glance { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 0; padding: 12px 16px; color: var(--sf-text, #f4f0ff); text-decoration: none;
  background: linear-gradient(90deg, #ff2e8817, transparent 65%), var(--v2-surface); border: 1px solid #ff2e8838; border-left: 3px solid var(--sf-heading-mark, #ff2e88);
  transition: border-color .2s, background-color .2s; }
.sf-deck-glance-cards { display: flex; align-items: center; flex: none; padding: 2px 14px 2px 0; }
.sf-deck-glance-cards img { position: relative; width: 34px; aspect-ratio: 63 / 88; margin-right: -14px; object-fit: cover; border-radius: 3px;
  box-shadow: 0 0 0 1px #0a0014, 0 4px 9px #000b; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.sf-deck-glance-more { margin-left: 22px; font-size: 12px; font-weight: 700; color: var(--sf-muted, #aaa0ba); }
.sf-deck-glance-text { flex: 1 1 170px; min-width: 0; display: grid; gap: 2px; }
.sf-deck-glance-text b { font: 800 15px/1.4 'Noto Sans Thai', sans-serif; color: var(--sf-heading, #fff); }
.sf-deck-glance-text small { font-size: 12.5px; line-height: 1.5; color: var(--sf-muted, #aaa0ba); }
.sf-deck-glance-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; }
.sf-deck-glance-state { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: 12px; font-weight: 700; line-height: 1.2; border: 1px solid; }
.sf-deck-glance-state .icon { width: 13px; height: 13px; stroke-width: 3; }
.sf-deck-glance-state.is-ok { color: #2ee59d; background: #2ee59d12; border-color: #2ee59d55; }
.sf-deck-glance-state.is-todo { color: var(--sf-price, #ffd24a); background: #ffd24a10; border-color: #ffd24a55; }
.sf-deck-glance-state.is-bad { color: var(--sf-danger, #ff4757); background: #ff47570f; border-color: #ff475766; }
.sf-deck-glance-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--sf-action, #00f0ff); white-space: nowrap; }
.sf-deck-glance-go .icon { width: 15px; height: 15px; transition: transform .2s; }
@media (hover: hover) and (pointer: fine) {
  .sf-deck-glance:hover { border-color: #ff2e8888; border-left-color: var(--sf-heading-mark, #ff2e88); background-color: #ff2e880a; }
  .sf-deck-glance:hover .sf-deck-glance-cards img { transform: translateX(calc(var(--k, 0) * 1px)) translateY(-2px); }
  .sf-deck-glance:hover .sf-deck-glance-go { color: var(--sf-action-hover, #fff); }
  .sf-deck-glance:hover .sf-deck-glance-go .icon { transform: translateY(2px); }
}
.sf-deck-glance:focus-visible { outline: 2px solid var(--sf-action, #00f0ff); outline-offset: 2px; }

.sf-deck-sale-board { margin-top: 2px; }
.sf-deck-sale-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; padding: 22px 0 20px; }
/* Zones = playmat panels (2026-10-09, owner: "แบ่งโซนให้สวยกว่านี้"): every tab is its own inset well — a head band
   (magenta bar · name · n/size chip · kinds) over its cards. .sf-deck-sale-faces (Legend / Champion / Leader /
   Commander, tabs of 1–2 cards) is a column at the main deck's left; .sf-deck-sale-rest holds the other tabs in rows
   under them: each part asks for --u card slots (Blade: copies, a sideways card = 2) and a row's spare width is shared
   out by --u, so the parts of a row line up with the main deck's edges. Cards are one size in every part (--cw);
   only the main deck stretches its columns to fill its row. A board under 1000px puts the faces in a row on top. */
.sf-deck-sale-board { container: dkboard / inline-size; }
.sf-deck-sale-parts { --cw: 118px; --cwf: 164px; --gx: 10px; --pp: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sf-deck-sale-parts.has-faces { grid-template-columns: auto minmax(0, 1fr); }
.sf-deck-sale-faces { display: flex; flex-direction: column; gap: 16px; }
.sf-deck-sale-faces > .sf-decks-board-part:last-child { flex-grow: 1; }
.sf-deck-sale-rest { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; }
.sf-deck-sale-rest > .sf-decks-board-part { flex: var(--u, 1) 1 calc(var(--u, 1) * (var(--cw) + var(--gx)) - var(--gx) + 2 * var(--pp) + 2px); min-width: 0; max-width: 100%; }
.sf-deck-sale-parts .sf-decks-board-part, .sf-deck-sale-parts .sf-decks-board-part + .sf-decks-board-part { --pe: #ffffff1f; margin: 0; padding: 0 var(--pp) var(--pp);
  background: linear-gradient(180deg, #ffffff07, transparent 160px), #07000fa6; border: 1px solid var(--pe); box-shadow: inset 0 1px 0 #ffffff0a, 0 10px 24px #0005; }
.sf-deck-sale-parts .sf-decks-board-head { gap: 6px 10px; margin: 0 calc(-1 * var(--pp)) 14px; padding: 11px var(--pp);
  background: linear-gradient(90deg, #ff2e881c, #ff2e8806 45%, transparent 75%); border-bottom: 1px solid var(--pe); }
.sf-deck-sale-parts .sf-decks-zone-h { font-size: 16px; }
.sf-deck-sale-parts .sf-decks-spread { grid-template-columns: repeat(auto-fill, minmax(var(--cw), 1fr)); gap: 12px var(--gx); }
.sf-deck-sale-rest .sf-decks-spread { grid-template-columns: repeat(auto-fill, var(--cw)); }
.sf-deck-sale-faces .sf-decks-spread { grid-template-columns: var(--cwf); }
.sf-deck-sale-faces .sf-decks-board-part { width: calc(var(--cwf) + 2 * var(--pp) + 2px); }
.sf-deck-sale-faces .sf-decks-board-head { gap: 6px 8px; }
.sf-deck-sale-parts .is-land .sf-decks-spread { grid-template-columns: repeat(auto-fill, calc(var(--cw) * 1.95)); }
@container dkboard (max-width: 1000px) {
  .sf-deck-sale-parts.has-faces { grid-template-columns: minmax(0, 1fr); }
  .sf-deck-sale-faces { flex-direction: row; flex-wrap: wrap; }
  .sf-deck-sale-faces .sf-decks-board-part, .sf-deck-sale-faces > .sf-decks-board-part:last-child { flex: 1 1 calc(var(--cwf) + 2 * var(--pp) + 2px); width: auto; }
  .sf-deck-sale-faces .sf-decks-spread { justify-content: center; }
  /* side by side, a name that wraps its chip must not drop that card below its neighbour's */
  .sf-deck-sale-faces .sf-decks-board-part { display: flex; flex-direction: column; }
  .sf-deck-sale-faces .sf-decks-spread { margin-top: auto; }
}
.sf-deck-sale-top .sf-decks-rules-view { flex: 0 1 560px; min-width: min(100%, 260px); margin: 0; background: #0a00148c; }
.sf-deck-sale-top .sf-decks-rules-head { padding: 9px 12px; font-size: 13px; }
.sf-deck-sale-caret { transition: transform .2s; }
.sf-deck-sale-top details[open] .sf-deck-sale-caret { transform: rotate(180deg); }
.sf-deck-sale-total { display: inline-flex; align-items: baseline; gap: 18px; padding-top: 6px; font-size: 13px; color: var(--sf-muted, #aaa0ba); }
.sf-deck-sale-total b { margin-right: 4px; font-size: 20px; color: var(--sf-heading, #fff); }
.sf-deck-sale-list { margin-top: 16px; }
@media (max-width: 680px) {
  .sf-listing-stage.is-deck.is-cover > img[data-gallery-main], .sf-deck-fan { width: min(50%, 220px); }
  .sf-deck-badge { left: 10px; bottom: 10px; gap: 8px; padding: 5px 12px 5px 5px; }
  .sf-deck-badge > .icon { width: 28px; height: 28px; padding: 6px; }
  .sf-deck-badge b { font-size: 18px; }
  .sf-deck-glance { padding: 12px; gap: 10px 12px; }
  .sf-deck-glance-cards img { width: 28px; margin-right: -13px; }
  .sf-deck-glance-text { flex-basis: 100%; }
  .sf-deck-glance-side { flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .sf-listing-stage.is-deck { padding-bottom: 66px; }
  .sf-deck-sale-top { padding: 16px 0 14px; }
  .sf-deck-sale-parts { --pp: 10px; --gx: 6px; gap: 12px; }
  .sf-deck-sale-rest { gap: 12px; }
  .sf-deck-sale-rest > .sf-decks-board-part { flex-basis: 100%; }
  .sf-deck-sale-parts .sf-decks-board-head { margin-bottom: 10px; padding-block: 9px; }
  .sf-deck-sale-parts .sf-decks-zone-h { font-size: 15px; }
  .sf-deck-sale-parts .sf-decks-spread, .sf-deck-sale-rest .sf-decks-spread { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px var(--gx); }
  .sf-deck-sale-parts .is-land .sf-decks-spread { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-deck-sale-faces { gap: 12px; }
  .sf-deck-sale-faces .sf-decks-board-head { gap: 4px 6px; }
  .sf-deck-sale-faces .sf-decks-zone-h { font-size: 14px; }
  .sf-deck-sale-faces .sf-decks-board-count { padding: 3px 6px; font-size: 12px; }
  .sf-deck-sale-faces .sf-decks-board-part, .sf-deck-sale-faces > .sf-decks-board-part:last-child { flex: 1 1 0; width: auto; min-width: 0; }
  .sf-deck-sale-faces .sf-decks-spread { grid-template-columns: minmax(0, 120px); justify-content: center; }
}
/* real photos of a deck (2026-10-09, owner: "มันควรมีรูปภาพจริงที่ใช้ประกอบด้วย"): a chip on the stage while a shop photo
   shows, a camera on its thumbs, and a line under the gallery that says whether the shop gave any */
.sf-listing-real { position: absolute; left: 42px; top: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  font: 700 12px/1.2 'Noto Sans Thai', sans-serif; color: #2ee59d; background: #0a0014d9; border: 1px solid #2ee59d66; pointer-events: none; }
.sf-listing-real .icon { width: 14px; height: 14px; }
.sf-listing-stage.is-cover .sf-listing-real { display: none; }
/* a photo of a deck is usually landscape (the whole deck laid out): it gets the stage's full width, not a card's box */
.sf-listing-stage.is-deck:not(.is-cover) { padding: 50px 18px 80px; }
.sf-listing-stage.is-deck:not(.is-cover) > img[data-gallery-main] { width: 100%; height: auto; max-height: min(72vh, 640px); aspect-ratio: auto; object-fit: contain; filter: drop-shadow(0 18px 30px #000a); }
.sf-listing-stage.is-deck:not(.is-cover):hover > img[data-gallery-main] { transform: none; }
@media (max-width: 680px) { .sf-listing-stage.is-deck:not(.is-cover) { padding: 46px 10px 66px; } }
.sf-thumbs button.is-photo { position: relative; }
.sf-thumbs button.is-photo .icon { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; padding: 3px; color: #04121a; background: #2ee59d; border-radius: 2px; }
.sf-listing-photonote { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; }
.sf-listing-photonote .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; color: #2ee59d; }
.sf-listing-photonote.is-none .icon { color: var(--sf-price, #ffd24a); }
