/* PrathetThai v2 — "ถ้วยรางวัลร้านดังประจำจังหวัด" · กรมท่า + ทอง + แดงชาด */
:root {
  --pt-navy: #1E2A5A; --pt-navy-2: #2B3A78; --pt-navy-3: #121A3D;
  --pt-gold: #D9A23A; --pt-gold-soft: #F4E3BD; --pt-gold-ink: #8A5E0F;
  --pt-red: #C8283C; --pt-red-soft: #F9E1E4;
  --pt-ink: #1B1F2E; --pt-muted: #5B6178; --pt-paper: #FFFFFF; --pt-ivory: #F7F5F0; --pt-line: #E4E0D6;
  --pt-medal-1: linear-gradient(145deg, #FBE7A1 0%, #E0AE3E 45%, #A8761A 100%);
  --pt-medal-2: linear-gradient(145deg, #F4F6FA 0%, #BCC3CF 45%, #7F8896 100%);
  --pt-medal-3: linear-gradient(145deg, #F6CBA3 0%, #C9824A 45%, #8A4F22 100%);
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  --sh-1: 0 1px 2px rgba(18,26,61,.06), 0 2px 8px rgba(18,26,61,.06);
  --sh-2: 0 4px 14px rgba(18,26,61,.10), 0 2px 4px rgba(18,26,61,.06);
  --sh-3: 0 18px 40px rgba(18,26,61,.18), 0 6px 12px rgba(18,26,61,.08);
  --t-fast: 150ms; --t-med: 250ms;
  --f-head: "Kanit", "Anuphan", system-ui, sans-serif;
  --f-body: "Anuphan", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pt-ink: #ECEEF6; --pt-muted: #A5ACC4; --pt-paper: #1A2142; --pt-ivory: #0F1530; --pt-line: #2C3563;
    --pt-gold-soft: #3A3120; --pt-gold-ink: #F2C867; --pt-red-soft: #3D1A24;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 4px 14px rgba(0,0,0,.45); --sh-3: 0 18px 40px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --pt-ink: #ECEEF6; --pt-muted: #A5ACC4; --pt-paper: #1A2142; --pt-ivory: #0F1530; --pt-line: #2C3563;
  --pt-gold-soft: #3A3120; --pt-gold-ink: #F2C867; --pt-red-soft: #3D1A24;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 4px 14px rgba(0,0,0,.45); --sh-3: 0 18px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--f-body); color: var(--pt-ink); background: var(--pt-ivory); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.005em; }
h1 { font-size: clamp(28px, 6vw, 48px); } h2 { font-size: clamp(22px, 4vw, 30px); } h3 { font-size: 18px; }
.pt-wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.pt-muted { color: var(--pt-muted); }
.pt-ico { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
:focus-visible { outline: 3px solid var(--pt-gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons ── */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 16px/1 var(--f-head); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--pt-red); color: #fff; box-shadow: 0 4px 12px rgba(200,40,60,.3); transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }
.pt-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(200,40,60,.35); }
.pt-btn:active { transform: translateY(1px); }
.pt-btn--gold { background: var(--pt-medal-1); color: var(--pt-navy-3); box-shadow: 0 4px 12px rgba(217,162,58,.35), inset 0 1px 0 rgba(255,255,255,.5); }
.pt-btn--ghost { background: transparent; color: var(--pt-ink); box-shadow: inset 0 0 0 2px var(--pt-line); }
.pt-btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--pt-gold); }
.pt-btn--light { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.pt-btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.pt-btn--block { width: 100%; }

/* ── Header ── */
.pt-top { position: sticky; top: 0; z-index: 40; background: rgba(18,26,61,.92); backdrop-filter: blur(10px); color: #fff; border-bottom: 1px solid rgba(217,162,58,.35); }
.pt-top__in { display: flex; align-items: center; gap: 12px; height: 60px; }
.pt-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 20px/1 var(--f-head); letter-spacing: .01em; }
.pt-brand b { color: var(--pt-gold); font-weight: 600; }
.pt-brand svg { width: 34px; height: 34px; }
.pt-top .pt-top__search { flex: 1; display: none; }
.pt-top__nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pt-top__nav a:not(.pt-btn) { color: rgba(255,255,255,.85); text-decoration: none; padding: 8px 10px; font-size: 15px; display: none; }
.pt-iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); border: 0; color: #fff; cursor: pointer; }
@media (min-width: 768px) { .pt-top .pt-top__search { display: flex; max-width: 420px; } .pt-top__nav a:not(.pt-btn) { display: inline-block; } .pt-iconbtn--search { display: none; } }

/* ── Search ── */
.pt-search { position: relative; display: flex; align-items: center; background: var(--pt-paper); border-radius: 999px; box-shadow: var(--sh-2); }
.pt-search svg { position: absolute; left: 16px; color: var(--pt-muted); }
.pt-search input { width: 100%; height: 52px; padding: 0 18px 0 46px; border: 0; background: transparent; font: inherit; color: var(--pt-ink); border-radius: 999px; }
.pt-top .pt-search { box-shadow: none; background: rgba(255,255,255,.1); }
.pt-top .pt-search input { height: 40px; color: #fff; font-size: 15px; } .pt-top .pt-search input::placeholder { color: rgba(255,255,255,.6); } .pt-top .pt-search svg { color: rgba(255,255,255,.7); }

/* ── Hero ── */
.pt-hero { position: relative; color: #fff; background: var(--pt-navy-3); overflow: hidden; isolation: isolate; }
.pt-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.pt-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,26,61,.55) 0%, rgba(18,26,61,.35) 40%, rgba(18,26,61,.92) 100%); }
.pt-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M24 4l6 10-6 10-6-10zM24 24l6 10-6 10-6-10zM4 24l10-6 10 6-10 6zM24 24l10-6 10 6-10 6z' fill='none' stroke='%23D9A23A' stroke-width='1'/%3E%3C/svg%3E"); }
.pt-hero__in { padding: 56px 0 40px; min-height: 480px; display: flex; flex-direction: column; justify-content: flex-end; }
.pt-hero--sm .pt-hero__in { min-height: 300px; padding: 40px 0 28px; }
.pt-hero h1 { max-width: 16ch; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.pt-hero h1 em { font-style: normal; color: var(--pt-gold); }
.pt-hero p { max-width: 560px; color: rgba(255,255,255,.88); margin: 0 0 20px; }
.pt-hero .pt-search { max-width: 560px; }
.pt-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pt-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--pt-gold); margin-bottom: 12px; }
.pt-eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.pt-stats { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 18px; }
.pt-stats div { font-size: 14px; color: rgba(255,255,255,.75); } .pt-stats strong { display: block; font: 600 26px/1.1 var(--f-head); color: #fff; }

/* ── Sections ── */
.pt-sec { padding: 40px 0 8px; }
.pt-sec__head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pt-sec__head h2 { margin: 0; } .pt-sec__head a { font: 500 15px/1 var(--f-head); color: var(--pt-red); text-decoration: none; white-space: nowrap; }
.pt-sec__head p { margin: 4px 0 0; color: var(--pt-muted); font-size: 15px; }
.pt-crumbs { font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 14px; } .pt-crumbs a { color: rgba(255,255,255,.85); }

/* ── Scroller ── */
.pt-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; margin-inline: -16px; scrollbar-width: none; }
.pt-scroll::-webkit-scrollbar { display: none; } .pt-scroll > * { scroll-snap-align: start; }
@media (min-width: 768px) { .pt-scroll { grid-auto-columns: calc((100% - 42px) / 4); } }

/* ── Medal ── */
.pt-medal { --m: var(--pt-medal-1); position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--m); color: #3B2A06; font: 700 18px/1 var(--f-head);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -3px 0 rgba(0,0,0,.18), 0 3px 8px rgba(0,0,0,.2); flex: none; }
.pt-medal::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.55); }
.pt-medal--2 { --m: var(--pt-medal-2); color: #2B3140; } .pt-medal--3 { --m: var(--pt-medal-3); color: #3A1D06; }
.pt-medal--lg { width: 64px; height: 64px; font-size: 26px; }
.pt-medal--n { background: var(--pt-ivory); color: var(--pt-muted); box-shadow: inset 0 0 0 2px var(--pt-line); } .pt-medal--n::before { display: none; }

/* ── Leader card ── */
.pt-lcard { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; background: var(--pt-paper); box-shadow: var(--sh-2); text-decoration: none; transition: transform var(--t-med), box-shadow var(--t-med); }
.pt-lcard:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.pt-lcard__img { aspect-ratio: 4/3; background: linear-gradient(160deg, var(--pt-gold-soft), var(--pt-ivory)); display: grid; place-items: center; }
.pt-lcard__img img { width: 72%; filter: drop-shadow(0 10px 14px rgba(0,0,0,.2)); }
.pt-lcard .pt-medal { position: absolute; top: 12px; left: 12px; }
.pt-lcard__body { padding: 12px 16px 16px; }
.pt-lcard__name { font: 600 18px/1.3 var(--f-head); display: block; }
.pt-lcard__meta { font-size: 14px; color: var(--pt-muted); }
.pt-ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(40deg); background: var(--pt-red); color: #fff; font: 600 12px/1 var(--f-head); padding: 6px 40px; box-shadow: var(--sh-1); }

/* ── Province card ── */
.pt-pgrid { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; margin-inline: -16px; scrollbar-width: none; }
@media (min-width: 768px) { .pt-pgrid { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; padding: 0; margin: 0; } }
.pt-pcard { position: relative; aspect-ratio: 3/4; border-radius: var(--r-md); overflow: hidden; color: #fff; text-decoration: none; box-shadow: var(--sh-2); scroll-snap-align: start; isolation: isolate; }
.pt-pcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 600ms; }
.pt-pcard:hover img { transform: scale(1.06); }
.pt-pcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(18,26,61,.92)); }
.pt-pcard__body { position: absolute; left: 14px; right: 14px; bottom: 14px; }
.pt-pcard__name { font: 600 20px/1.2 var(--f-head); display: block; }
.pt-pcard__meta { font-size: 14px; color: rgba(255,255,255,.8); }
.pt-pcard__lead { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.2); font-size: 14px; }
.pt-pcard__lead .pt-medal { width: 22px; height: 22px; font-size: 11px; } .pt-pcard__lead .pt-medal::before { display: none; }

/* ── Map ── */
.pt-mapwrap { display: grid; gap: 24px; background: var(--pt-paper); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); }
@media (min-width: 900px) { .pt-mapwrap { grid-template-columns: minmax(0, 420px) 1fr; padding: 32px; } }
.pt-map { width: 100%; max-width: 420px; margin: auto; }
.pt-map .t rect { rx: 6; fill: var(--pt-ivory); stroke: var(--pt-line); stroke-width: 1; transition: fill var(--t-fast), transform var(--t-fast); cursor: pointer; }
.pt-map .t[data-l="1"] rect { fill: #D8DDF0; } .pt-map .t[data-l="2"] rect { fill: #8E9ACB; } .pt-map .t[data-l="3"] rect { fill: var(--pt-navy-2); } .pt-map .t[data-l="4"] rect { fill: var(--pt-navy); }
:root[data-theme="dark"] .pt-map .t[data-l="1"] rect { fill: #3B4679; }
.pt-map .t text { font: 500 8.5px/1 var(--f-body); fill: var(--pt-muted); text-anchor: middle; pointer-events: none; }
.pt-map .t[data-l="3"] text, .pt-map .t[data-l="4"] text { fill: #fff; }
.pt-map .t.pilot rect { stroke: var(--pt-gold); stroke-width: 2; }
.pt-map .t.sister rect { fill: var(--pt-red-soft); stroke: var(--pt-red); stroke-dasharray: 3 2; }
.pt-map .t:hover rect, .pt-map .t:focus rect, .pt-map .t.on rect { fill: var(--pt-gold); stroke: var(--pt-gold-ink); } .pt-map .t:hover text, .pt-map .t.on text { fill: var(--pt-navy-3); }
.pt-map .t:focus { outline: none; }
.pt-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--pt-muted); margin-top: 12px; justify-content: center; }
.pt-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--pt-line); }
.pt-mapinfo { align-self: center; }
.pt-mapinfo h3 { font-size: 26px; margin: 4px 0 6px; }
.pt-regions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ── Chips ── */
.pt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--pt-paper); border: 1.5px solid var(--pt-line); font: 500 15px/1 var(--f-head); text-decoration: none; color: var(--pt-ink); white-space: nowrap; cursor: pointer; }
.pt-chip { flex: none; }
.pt-chip:hover { border-color: var(--pt-gold); } .pt-chip.is-on { background: var(--pt-navy); border-color: var(--pt-navy); color: #fff; }
.pt-chip img { width: 26px; height: 26px; margin-left: -6px; }
.pt-chipbar { position: sticky; top: 60px; z-index: 30; background: color-mix(in srgb, var(--pt-ivory) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pt-line); }
.pt-chipbar .pt-wrap { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }

/* ── Podium ── */
.pt-board { background: var(--pt-paper); border-radius: var(--r-lg); padding: 20px 16px; box-shadow: var(--sh-1); margin-top: 20px; scroll-margin-top: 130px; }
.pt-board__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pt-board__head img { width: 56px; height: 56px; }
.pt-board__head h2 { margin: 0; font-size: 22px; } .pt-board__head a { margin-left: auto; font: 500 14px/1 var(--f-head); color: var(--pt-red); text-decoration: none; }
.pt-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 8px; margin-top: 12px; }
.pt-pod { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; min-width: 0; }
.pt-pod--1 { order: 2; } .pt-pod--2 { order: 1; } .pt-pod--3 { order: 3; }
.pt-pod__who { padding: 0 4px 10px; min-width: 0; width: 100%; }
.pt-pod__name { font: 600 15px/1.3 var(--f-head); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.pt-pod__score { font-size: 14px; color: var(--pt-muted); }
.pt-pod__step { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font: 700 30px/1 var(--f-head); color: rgba(255,255,255,.9); box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.pt-pod--1 .pt-pod__step { height: 104px; background: var(--pt-medal-1); color: rgba(59,42,6,.55); }
.pt-pod--2 .pt-pod__step { height: 76px; background: var(--pt-medal-2); color: rgba(43,49,64,.5); }
.pt-pod--3 .pt-pod__step { height: 58px; background: var(--pt-medal-3); color: rgba(58,29,6,.5); }
.pt-pod--1 .pt-pod__name { font-size: 17px; }
.pt-pod--empty .pt-pod__step { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--pt-line) 8px 9px); box-shadow: inset 0 0 0 2px var(--pt-line); color: var(--pt-muted); }
.pt-pod--empty .pt-pod__who img { width: 48px; height: 48px; margin: auto; opacity: .85; }
.pt-pod--empty .pt-pod__name { color: var(--pt-red); }

/* ── Rank rows ── */
.pt-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-rrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--pt-paper); border-radius: var(--r-md); box-shadow: var(--sh-1); text-decoration: none; transition: box-shadow var(--t-fast); }
.pt-rrow:hover { box-shadow: var(--sh-2); }
.pt-rrow__body { flex: 1; min-width: 0; } .pt-rrow__name { font: 600 16px/1.3 var(--f-head); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-rrow__meta { font-size: 14px; color: var(--pt-muted); }
.pt-rrow__score { text-align: right; font: 600 18px/1 var(--f-head); } .pt-rrow__score small { display: block; font: 400 12px/1.4 var(--f-body); color: var(--pt-muted); }
.pt-trend { display: inline-flex; align-items: center; gap: 2px; font: 600 13px/1 var(--f-head); padding: 3px 6px; border-radius: 6px; }
.pt-trend--up { color: #1B7F4B; background: #E1F4E9; } .pt-trend--down { color: var(--pt-red); background: var(--pt-red-soft); } .pt-trend--new { color: var(--pt-gold-ink); background: var(--pt-gold-soft); }
.pt-rrow--empty { background: transparent; box-shadow: none; border: 2px dashed var(--pt-line); }
.pt-rrow--empty .pt-rrow__name { color: var(--pt-muted); }

/* ── Top-3 big cards (board) ── */
.pt-top3 { display: grid; gap: 14px; }
@media (min-width: 768px) { .pt-top3 { grid-template-columns: 1fr 1.15fr 1fr; align-items: end; } .pt-top3 > :nth-child(1) { order: 2; } .pt-top3 > :nth-child(2) { order: 1; } .pt-top3 > :nth-child(3) { order: 3; } }
.pt-bigc { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--pt-paper); box-shadow: var(--sh-2); text-decoration: none; overflow: hidden; }
.pt-bigc::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--pt-medal-1); }
.pt-bigc--2::before { background: var(--pt-medal-2); } .pt-bigc--3::before { background: var(--pt-medal-3); }
@media (min-width: 768px) { .pt-bigc { flex-direction: column; text-align: center; padding: 24px 16px; } .pt-bigc--1 { padding-block: 36px; background: linear-gradient(180deg, var(--pt-gold-soft), var(--pt-paper) 60%); } }
.pt-bigc__name { font: 600 19px/1.3 var(--f-head); } .pt-bigc__meta { font-size: 14px; color: var(--pt-muted); }
.pt-bigc__score { font: 700 28px/1 var(--f-head); color: var(--pt-navy); } :root[data-theme="dark"] .pt-bigc__score { color: var(--pt-gold); }
.pt-bigc__score small { font: 400 13px var(--f-body); color: var(--pt-muted); }

/* ── Badges ── */
.pt-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font: 500 12px/1.3 var(--f-head); background: var(--pt-ivory); color: var(--pt-muted); vertical-align: 1px; }
.pt-badge--team { background: var(--pt-gold-soft); color: var(--pt-gold-ink); } .pt-badge--owner { background: #E1F4E9; color: #1B7F4B; } .pt-badge--vs { background: var(--pt-red-soft); color: var(--pt-red); }

/* ── Place ── */
.pt-phero { position: relative; background: var(--pt-navy-3); color: #fff; overflow: hidden; }
.pt-phero__img { aspect-ratio: 16/10; max-height: 420px; width: 100%; object-fit: cover; opacity: .9; }
.pt-phero__cut { display: grid; place-items: center; aspect-ratio: 16/9; max-height: 340px; background: radial-gradient(circle at 50% 60%, var(--pt-navy-2), var(--pt-navy-3)); }
.pt-phero__cut img { width: min(60%, 320px); filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); }
.pt-pcardx { position: relative; margin-top: -48px; background: var(--pt-paper); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 20px; }
.pt-pcardx__top { display: flex; gap: 14px; align-items: flex-start; }
.pt-pcardx h1 { font-size: clamp(24px, 5vw, 34px); margin: 0 0 4px; }
.pt-meter { margin-top: 18px; padding: 16px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--pt-navy), var(--pt-navy-2)); color: #fff; }
.pt-meter__nums { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.pt-meter__big { display: flex; align-items: baseline; gap: 6px; font: 700 44px/1 var(--f-head); color: var(--pt-gold); } .pt-meter__big strong { font-weight: 700; } .pt-meter__big small { font: 400 15px var(--f-body); color: rgba(255,255,255,.75); }
.pt-meter__sub { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; white-space: nowrap; font-size: 14px; color: rgba(255,255,255,.8); } .pt-meter__sub strong { color: #fff; font-family: var(--f-head); }
.pt-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.15); margin: 14px 0 8px; overflow: hidden; }
.pt-bar i { display: block; height: 100%; border-radius: inherit; background: var(--pt-medal-1); }
.pt-meter p { margin: 0; font-size: 15px; } .pt-meter p b { color: var(--pt-gold); }
.pt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pt-contact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pt-share { display: flex; gap: 8px; }
.pt-share a, .pt-share button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff; }
.pt-note { margin: 14px 0 0; padding: 12px 14px; border-left: 4px solid var(--pt-gold); background: var(--pt-gold-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ── Sticky vote bar (mobile) ── */
.pt-vbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--pt-paper) 94%, transparent); backdrop-filter: blur(10px); box-shadow: 0 -6px 20px rgba(18,26,61,.12); display: flex; gap: 10px; }
.pt-vbar .pt-btn { flex: 1; }
@media (min-width: 900px) { .pt-vbar { position: static; box-shadow: none; background: none; padding: 0; } }
body.has-vbar { padding-bottom: 80px; } @media (min-width: 900px) { body.has-vbar { padding-bottom: 0; } }
.pt-float { position: fixed; pointer-events: none; font: 700 32px/1 var(--f-head); color: var(--pt-gold); text-shadow: 0 2px 8px rgba(0,0,0,.3); animation: pt-float 1.1s ease-out forwards; z-index: 60; }
@keyframes pt-float { from { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; transform: translateY(-10px) scale(1.15); } to { opacity: 0; transform: translateY(-90px) scale(1); } }
.pt-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--pt-navy-3); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--sh-3); font-size: 15px; z-index: 60; }

/* ── How it works ── */
.pt-how { background: var(--pt-navy); color: #fff; border-radius: var(--r-lg); padding: 32px 20px; position: relative; overflow: hidden; }
.pt-how::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 40px solid rgba(217,162,58,.12); }
.pt-how h2 { color: #fff; } .pt-how h2 em { color: var(--pt-gold); font-style: normal; }
.pt-steps { display: grid; gap: 16px; margin: 20px 0 24px; padding: 0; list-style: none; counter-reset: s; }
@media (min-width: 768px) { .pt-steps { grid-template-columns: repeat(3, 1fr); } .pt-how { padding: 44px; } }
.pt-steps li { background: rgba(255,255,255,.06); border: 1px solid rgba(217,162,58,.25); border-radius: var(--r-md); padding: 18px; }
.pt-steps svg { width: 40px; height: 40px; color: var(--pt-gold); margin-bottom: 8px; }
.pt-steps b { display: block; font: 600 18px/1.3 var(--f-head); margin-bottom: 4px; } .pt-steps span { color: rgba(255,255,255,.78); font-size: 15px; }
.pt-owner { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); }
.pt-owner p { margin: 0; font: 500 18px/1.4 var(--f-head); }

/* ── Footer ── */
.pt-foot { margin-top: 56px; background: var(--pt-navy-3); color: rgba(255,255,255,.75); padding: 40px 0 28px; font-size: 15px; border-top: 3px solid var(--pt-gold); }
.pt-foot__grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .pt-foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.pt-foot h4 { font: 600 15px/1 var(--f-head); color: var(--pt-gold); margin: 0 0 12px; letter-spacing: .04em; }
.pt-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .pt-foot a { color: rgba(255,255,255,.8); text-decoration: none; } .pt-foot a:hover { color: #fff; }
.pt-foot__brand { grid-column: 1 / -1; } @media (min-width: 900px) { .pt-foot__brand { grid-column: auto; } }
.pt-foot__legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; }


/* ── ส่วนเสริมของหน้าจริง ── */
.sr-only:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; clip: auto; z-index: 99; background: var(--pt-gold); color: var(--pt-navy-3); padding: 8px 12px; border-radius: 8px; }
.pt-small { font-size: 14px; } .pt-center { text-align: center; margin-top: 20px; } .pt-h3 { font-size: 20px; }
.pt-narrow { max-width: 760px; margin-inline: auto; }
.pt-hero__in { position: relative; }
.pt-hero__cut { position: absolute; right: -10px; bottom: 10px; width: min(46%, 340px); height: auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.5)); z-index: -1; }
.pt-crumbs--ink { color: var(--pt-muted); margin-bottom: 6px; } .pt-crumbs--ink a { color: var(--pt-muted); }
.pt-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; } .pt-badges:empty { display: none; }
.pt-region { margin-top: 12px; background: var(--pt-paper); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.pt-region summary { cursor: pointer; padding: 14px 18px; font: 600 17px/1.3 var(--f-head); list-style-position: inside; }
.pt-region summary small { font: 400 14px var(--f-body); color: var(--pt-muted); margin-left: 6px; }
.pt-region .pt-regions { padding: 0 18px 16px; margin: 0; }
.pt-chip small { color: var(--pt-muted); font-size: 12px; } .pt-chip.is-on small { color: var(--pt-gold); }
.pt-foot__h { font: 600 15px/1 var(--f-head); color: var(--pt-gold); margin: 0 0 12px; letter-spacing: .04em; }
.pt-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pt-links a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--pt-paper); box-shadow: var(--sh-1); font-size: 14px; text-decoration: none; }
.pt-link { color: var(--pt-red); font: 600 16px var(--f-head); text-decoration: none; }
.pt-vote__msg { min-height: 1.4em; margin: 10px 0 0; font-size: 15px; } .pt-vote__msg.is-ok { color: #1B7F4B; } .pt-vote__msg.is-err { color: var(--pt-red); }
:root[data-theme="dark"] .pt-vote__msg.is-ok { color: #6FD39C; }
.pt-place .pt-vbar { margin-top: 16px; }
@media (max-width: 899px) { .pt-place .pt-vbar { margin-top: 0; } }
.pt-pcardx a { color: inherit; }
.pt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ── Form ── */
.pt-form { margin-top: -32px; position: relative; display: grid; gap: 16px; }
.pt-form fieldset { margin: 0; border: 0; background: var(--pt-paper); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 20px; display: grid; gap: 14px; }
.pt-form legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font: 600 18px/1 var(--f-head); margin-bottom: 4px; }
.pt-form legend span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pt-medal-1); color: var(--pt-navy-3); font-size: 15px; }
.pt-form label { display: grid; gap: 6px; font: 500 15px/1.3 var(--f-head); }
.pt-form input:not([type=checkbox]), .pt-form select, .pt-form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--pt-line); background: var(--pt-ivory); color: var(--pt-ink); font: 400 16px/1.4 var(--f-body); }
.pt-form input:focus, .pt-form select:focus, .pt-form textarea:focus { border-color: var(--pt-gold); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pt-gold) 30%, transparent); }
.pt-form .pt-check { display: flex; align-items: center; gap: 10px; } .pt-check input { width: 20px; height: 20px; accent-color: var(--pt-red); }
.pt-form__sister { margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--pt-red-soft); }
.pt-form__msg { margin: 0; min-height: 1.4em; } .pt-form__msg.is-err { color: var(--pt-red); }
.pt-done { background: var(--pt-paper); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 28px 20px; text-align: center; }
.pt-ticket { display: inline-block; margin: 12px 0; padding: 14px 24px; border-radius: var(--r-md); border: 2px dashed var(--pt-gold); background: var(--pt-gold-soft); font: 700 28px/1 var(--f-head); letter-spacing: .08em; color: var(--pt-gold-ink); }
.pt-mylist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-mylist li { background: var(--pt-paper); border-radius: var(--r-md); box-shadow: var(--sh-1); padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pt-mylist b { font: 600 17px var(--f-head); letter-spacing: .05em; }
@media (max-width: 767px) { .pt-hero__cut { opacity: .45; width: 42%; } }
.pt-podium { max-width: 640px; margin-inline: auto; }
@media (min-width: 1000px) { .pt-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; } }
.pt-top__nav a.pt-iconbtn { display: grid; padding: 0; }
@media (min-width: 768px) { .pt-top__nav a.pt-iconbtn--search { display: none; } }

/* ── ฟอร์มหลายขั้น + การ์ดตัวอย่าง ── */
.pt-addgrid { display: grid; gap: 20px; max-width: 1000px; margin-inline: auto; }
@media (min-width: 900px) { .pt-addgrid { grid-template-columns: 1fr 300px; align-items: start; } .pt-preview { position: sticky; top: 80px; margin-top: 24px; } }
.pt-preview__lbl { font: 600 14px/1 var(--f-head); color: var(--pt-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; }
.pt-preview .pt-lcard { pointer-events: none; }
.pt-preview .pt-lcard__img { aspect-ratio: 16/10; } .pt-preview .pt-lcard__img img { width: 46%; }
@media (max-width: 899px) { .pt-preview { order: -1; } .pt-preview .pt-lcard { display: flex; align-items: center; } .pt-preview .pt-lcard__img { width: 96px; flex: none; aspect-ratio: 1; } .pt-preview .pt-lcard__img img { width: 80%; } .pt-preview .pt-medal { width: 30px; height: 30px; font-size: 14px; top: 6px; left: 6px; } .pt-preview .pt-ribbon, .pt-preview p { display: none; } }
.pt-wiz__steps { display: flex; gap: 6px; margin: 16px 0 -8px; position: relative; }
.pt-wiz__steps span { flex: 1; text-align: center; padding: 8px 4px; border-radius: 999px; font: 500 13px/1.2 var(--f-head); background: var(--pt-paper); color: var(--pt-muted); box-shadow: var(--sh-1); }
.pt-wiz__steps span.is-on { background: var(--pt-navy); color: #fff; } .pt-wiz__steps span.is-done { background: var(--pt-gold-soft); color: var(--pt-gold-ink); }
.pt-wiz__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.pt-form.is-wizard { margin-top: 24px; }
.pt-form.is-wizard fieldset:not(.is-on), .pt-form.is-wizard > .pt-btn--block:not(.is-on) { display: none; }
.pt-field-err { border-color: var(--pt-red) !important; }
@media (max-width: 899px) { .pt-addgrid { margin-top: -32px; position: relative; } .pt-addgrid .pt-form:not(.is-wizard) { margin-top: 0; } }
.pt-owner-page .pt-form { margin-top: -32px; } .pt-owner-page .pt-done { margin-top: -32px; position: relative; }
.pt-owner__prev { max-height: 260px; width: auto; margin: 0 auto; border-radius: var(--r-md); box-shadow: var(--sh-2); }
.pt-form__msg.is-ok { color: #1B7F4B; }
.pt-place__foot { display: flex; flex-direction: column; gap: 10px; }
.pt-link--muted { color: var(--pt-muted); font-size: 15px; }
.pt-lcard__img img, .pt-hero__cut, .pt-phero__cut img, .pt-board__head img, .pt-chip img { height: auto; }
@media (max-width: 899px) { .pt-preview__lbl { display: none; } }

/* PT5: เครื่องมือร้าน (ภาพประกาศ/สติกเกอร์) + ชี้ปุ่มเช็กอินเมื่อมาจาก QR */
.pt-shop-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
@keyframes pt-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,162,58,.7); } 50% { box-shadow: 0 0 0 10px rgba(217,162,58,0); } }
.pt-pulse { animation: pt-pulse 1.4s ease-in-out 4; }
