/* คำมั่นเพื่อโลก 2570 — site styles */
:root {
  --forest: #0F3D2E; --green: #2E9E6A; --green-d: #1F7A52; --sun: #F5C24B; --sun-l: #FFD58A;
  --ink: #12261D; --muted: #4A5D53; --muted-2: #5C6E64; --line: #D5DCD7; --line-2: #E2E4DA;
  --cream: #F6F4EC; --cream-2: #FBF8F0; --white: #FFFFFF; --red-bg: #FDECEA; --red: #B3261E; --red-ink: #5F1D17;
  --gutter: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.6 "IBM Plex Sans Thai", system-ui, sans-serif; }
body.dark { background: var(--forest); color: #fff; }
body.home { background: var(--cream-2); }
body.adm { background: #F3F5F2; }
a { color: var(--green-d); }
a:hover { color: var(--forest); }
h1, h2, h3 { font-family: Prompt, "IBM Plex Sans Thai", sans-serif; line-height: 1.3; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
textarea:focus, select:focus, input:focus { outline: 3px solid var(--sun); outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 14px; border: 0; font: 600 16px "IBM Plex Sans Thai", sans-serif; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: #164f3c; color: #fff; }
.btn-sun { background: var(--sun-l); color: #2E1236; box-shadow: 0 12px 30px rgba(255,180,90,.35); }
.btn-sun:hover { color: #2E1236; filter: brightness(1.04); }
.btn-ghost { background: #fff; border: 2px solid var(--forest); color: var(--forest); }
.btn-outline-light { border: 2px solid rgba(255,255,255,.8); color: #fff; background: transparent; }
.btn-outline-light:hover { color: #fff; background: rgba(255,255,255,.1); }
.btn-link { background: transparent; color: var(--green-d); text-decoration: underline; padding: 0 12px; }
.btn-lg { min-height: 58px; font-size: 18px; border-radius: 16px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer; font: 500 13px "IBM Plex Sans Thai", sans-serif;
  background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--forest); color: #fff; border-color: var(--forest); font-weight: 600; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; background: #EEF2EE; border-radius: 12px; padding: 4px; }
.seg button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font: 500 14px "IBM Plex Sans Thai", sans-serif; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--forest); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- logo / header ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--forest); color: var(--sun); display: flex;
  align-items: center; justify-content: center; font: 700 13px Prompt, sans-serif; flex-shrink: 0; }
.logo-name { font: 600 16px Prompt, sans-serif; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--gutter);
  background: #fff; border-bottom: 1px solid var(--line-2); }
.topbar-dark { background: transparent; border: 0; color: #fff; }
.topbar-dark .logo-mark { background: var(--sun); color: var(--forest); }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #DCEFE3; color: #1F5F40; display: flex; align-items: center;
  justify-content: center; font-weight: 600; flex-shrink: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--green-d); text-decoration: underline; cursor: pointer; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.steps li { padding: 6px 14px; border-radius: 999px; font-weight: 600; background: #EEF2EE; color: var(--muted-2); }
.steps li.on { background: var(--forest); color: #fff; }
.steps li.done { background: #DCEFE3; color: #1F5F40; }

/* ---------- pledge card ---------- */
.pc { position: relative; overflow: hidden; width: 100%; height: 100%; container-type: inline-size; border-radius: 24px;
  text-align: left; }
.pc-scene { position: absolute; inset: 0; pointer-events: none; }
.pc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3cqw; padding: 7.5cqw 7cqw; }
.pc-small { font-size: max(11px, 3.7cqw); font-weight: 500; opacity: .95; text-shadow: var(--pc-shadow); }
.pc-text { margin: 0; font: 600 max(13px, 6.6cqw)/1.5 Mali, "IBM Plex Sans Thai", sans-serif; word-break: break-word; text-shadow: var(--pc-shadow); }
.pc-text.pc-long { font-size: max(12px, 5.3cqw); }
.pc-compact { border-radius: 18px; }
.pc-compact .pc-body { padding: 7cqw; }
.pc-compact .pc-text { font-size: max(12px, 8cqw); }
.pc-photo { position: absolute; z-index: 1; left: 6%; bottom: 6%; width: 44%; padding: 2cqw 2cqw 6cqw; background: #fff; border-radius: 6px;
  transform: rotate(-4deg); box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.pc-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.pc-sticker { position: absolute; z-index: 2; width: 14.7cqw; height: 14.7cqw; padding: 0; border: 0; background: transparent; display: block; }
button.pc-sticker { cursor: pointer; }

/* ---------- home ---------- */
.hero { position: relative; min-height: 760px; display: flex; flex-direction: column; color: #fff; }
.hero-bg, .fill { position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26,12,40,.55) 0%, rgba(26,12,40,.15) 60%, transparent 100%); }
.hero header { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gutter); }
.hero .logo-mark { background: #fff; color: var(--forest); width: 46px; height: 46px; border-radius: 13px; font-size: 14px; font-weight: 800; }
.hero .logo-name { font-size: 18px; }
.hero nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero nav a { padding: 12px 16px; border-radius: 999px; text-decoration: none; font-weight: 500; color: #fff; }
.hero nav a.pill { background: #fff; color: #2E1236; font-weight: 600; padding: 12px 22px; }
.hero-main { position: relative; flex-grow: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding-top: 24px; padding-bottom: 80px; width: 100%; }
.hero-copy { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.live { align-self: flex-start; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35); font-weight: 500; font-size: 14px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #9CFFB8; box-shadow: 0 0 0 4px rgba(156,255,184,.25); }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(38px, 6vw, 72px); line-height: 1.12; text-shadow: 0 4px 24px rgba(30,10,40,.35); }
.hero h1 span { color: var(--sun-l); }
.hero p.lead { margin: 0; font-size: 19px; line-height: 1.75; max-width: 540px; opacity: .95; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { flex: 1 1 420px; min-width: 0; position: relative; height: 520px; }
.hero-card { position: absolute; width: 170px; height: 226px; }
.hero-card > div { width: 100%; height: 100%; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 50px rgba(20,8,30,.45); border: 3px solid rgba(255,255,255,.9); }
.hero-captain { position: absolute; left: 50%; bottom: 0; margin-left: -100px; width: 200px; height: 234px; animation: bob 3.2s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(20,8,30,.35)); }
.hero-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 60px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head h2 { margin: 0; font-size: 30px; color: var(--forest); }
.strip { overflow: hidden; padding: 12px 0 28px; }
.strip-track { display: flex; gap: 20px; width: max-content; animation: marquee 60s linear infinite; }
.strip-track:hover { animation-play-state: paused; }
.strip-card { position: relative; margin: 0; flex-shrink: 0; width: 190px; height: 250px; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 30px rgba(15,61,46,.18); }
.strip-card figcaption { position: absolute; z-index: 3; left: 12px; bottom: 10px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.9); color: var(--ink); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.how { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
.how-head { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.how-head h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); color: var(--forest); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.how-step { position: relative; background: #fff; border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 16px 40px rgba(15,61,46,.08); overflow: hidden; }
.how-step .blob { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; }
.how-step .badge { position: relative; width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.how-step h3 { position: relative; margin: 0; font-size: 23px; color: var(--forest); }
.how-step p { position: relative; margin: 0; color: #33473D; line-height: 1.7; }
.how-step small { position: relative; font: 700 14px Prompt, sans-serif; color: var(--muted-2); }
.trust { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 14px; color: #33473D; }
.trust span { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #E6F3EA; }
.teaser { position: relative; background: var(--forest); color: #fff; overflow: hidden; }
.teaser-in { position: relative; padding-top: 72px; padding-bottom: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.teaser-copy { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.teaser h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); }
.teaser p { margin: 0; font-size: 17px; line-height: 1.75; color: #CFE5D8; max-width: 520px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.stat-grid div { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; }
.stat-grid b { font: 700 28px Prompt, sans-serif; color: var(--sun-l); }
.stat-grid span { font-size: 13px; color: #CFE5D8; }
.mini-map { position: relative; height: 440px; aspect-ratio: 327 / 600; max-width: 100%; margin: 0 auto; }
.mini-map svg { width: 100%; height: 100%; display: block; }
.mini-pin { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.mini-pin i, .mini-pin b { position: absolute; inset: 0; border-radius: 50%; background: var(--sun-l); }
.mini-pin i { animation: pulse 2.4s ease-out infinite; }
.mini-pin b { box-shadow: 0 0 12px 3px rgba(255,213,138,.7); }
.login { padding: 80px var(--gutter); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px;
  background: linear-gradient(180deg, var(--cream-2), #EAF5EE); }
.login-copy { flex: 1 1 340px; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.login-copy h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); color: var(--forest); }
.login-box { flex: 1 1 380px; max-width: 440px; background: #fff; border-radius: 28px; box-shadow: 0 24px 60px rgba(15,61,46,.14);
  padding: 30px 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.login-box h3 { margin: 0; font-size: 22px; color: var(--forest); }
.sso { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; border-radius: 14px; text-decoration: none;
  font-weight: 500; font-size: 16px; }
.sso-google { border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
.sso-facebook { background: #1877F2; color: #fff; }
.sso-facebook:hover { color: #fff; filter: brightness(1.05); }
.sso-thaid { background: var(--forest); color: #fff; font-weight: 600; }
.sso-thaid:hover { color: #fff; }
.sso.off { opacity: .5; pointer-events: none; }
.note { font-size: 13px; color: #5A4610; background: #FFF6DE; padding: 10px 12px; border-radius: 10px; line-height: 1.6; }
.err { font-size: 14px; color: var(--red-ink); background: var(--red-bg); padding: 10px 12px; border-radius: 10px; }
.foot { padding: 24px var(--gutter); background: #0B2E22; color: #CFE5D8; font-size: 13px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.foot a { color: #CFE5D8; }

/* ---------- compose ---------- */
.compose { max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 48px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.preview { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; position: sticky; top: 16px; }
.preview h1 { margin: 0; align-self: stretch; font-size: 28px; color: var(--forest); }
.preview-card { width: 100%; max-width: 380px; aspect-ratio: 3 / 4; border-radius: 24px; box-shadow: 0 24px 50px rgba(15,61,46,.25); }
.preview small { font-size: 13px; color: var(--muted-2); text-align: center; }
.panel { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; background: #fff; border-radius: 24px; padding: 28px;
  box-shadow: 0 12px 36px rgba(15,61,46,.08); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-title { font-weight: 600; font-size: 15px; }
.field-title small, .field > label small { font-weight: 400; color: var(--muted-2); font-size: 13px; }
.big-label { font: 600 18px Prompt, sans-serif !important; color: var(--forest); }
textarea, .input, select { font: 400 16px "IBM Plex Sans Thai", sans-serif; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
textarea { font-size: 17px; line-height: 1.6; resize: vertical; border-radius: 14px; }
.input, select { min-height: 46px; padding: 0 14px; }
.hint-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted-2); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; padding: 3px; }
.scene-grid button { height: 66px; border-radius: 12px; cursor: pointer; display: flex; align-items: flex-end; justify-content: flex-start; padding: 5px;
  border: 0; box-shadow: 0 0 0 1px var(--line); }
.scene-grid button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--forest); }
.scene-grid span { padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.9); color: var(--ink); font: 600 11px/1.4 "IBM Plex Sans Thai", sans-serif; }
.swatches, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 46px; height: 46px; border-radius: 50%; cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--forest); }
.pattern { min-height: 44px; padding: 0 16px; border-radius: 12px; cursor: pointer; font: 500 15px "IBM Plex Sans Thai", sans-serif; background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.pattern[aria-pressed="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.sticker-btn { width: 50px; height: 50px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #FAFAF6; padding: 10px; cursor: pointer; }
.drop { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 2px dashed #B9C7BE; background: #FAFCFA; cursor: pointer; }
.drop .ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: #DCEFE3; display: flex; align-items: center; justify-content: center; }
.drop b { display: block; font-size: 15px; color: var(--forest); }
.drop span span { font-size: 13px; color: var(--muted); }
.photo-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); flex-wrap: wrap; }
.photo-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.photo-row .meta { flex: 1 1 120px; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.photo-row .meta b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.small-btn { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  font: 600 13px "IBM Plex Sans Thai", sans-serif; cursor: pointer; color: var(--ink); }
.small-btn.danger { border: 0; background: var(--red-bg); color: #8C2A20; }
.two { display: flex; flex-wrap: wrap; gap: 12px; }
.two > .field { flex: 1 1 160px; }
.alert { display: flex; gap: 12px; padding: 16px; border-radius: 16px; background: var(--red-bg); border: 1.5px solid #E7A39B; color: var(--red-ink); font-size: 14px; line-height: 1.6; }
.alert b { font-size: 15px; display: block; }
.alert mark { background: #F6C4BE; color: var(--red-ink); padding: 0 3px; border-radius: 4px; }
.checking { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #EAF3FA; color: #1E3A5F; font-size: 15px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #A9C7E2; border-top-color: #1E3A5F; animation: spin .8s linear infinite; flex-shrink: 0; }
.closed { padding: 16px; border-radius: 16px; background: #FFF6DE; color: #5A4610; }

/* send stage */
.stage { position: relative; overflow: hidden; max-width: 1000px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px) 56px; display: flex; flex-direction: column;
  align-items: center; gap: 24px; text-align: center; }
.stage h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); color: var(--forest); }
.stage p { margin: 0; font-size: 17px; color: #33473D; max-width: 560px; line-height: 1.7; }
.stage-box { position: relative; width: 100%; max-width: 820px; height: 440px; border-radius: 28px; overflow: hidden; }
.stage-captain { position: absolute; right: 8%; bottom: 40px; width: 220px; height: 260px; animation: bob 3s ease-in-out infinite; }
.flying { position: absolute; width: 200px; height: 260px; animation: tocap 2.4s cubic-bezier(.5,0,.3,1) forwards; }
.flying .pc { border-radius: 18px; box-shadow: 0 18px 40px rgba(15,61,46,.3); }
.received { position: absolute; right: calc(8% + 70px); bottom: 150px; width: 80px; height: 100px; animation: pop .5s ease-out both; }
.received div { width: 80px; height: 100px; border-radius: 10px; box-shadow: 0 6px 14px rgba(15,61,46,.25); transform: rotate(-8deg); }
.bubble { position: absolute; left: 6%; top: 46%; max-width: 46%; padding: 18px 20px; border-radius: 20px 20px 20px 4px; background: #fff; text-align: left;
  font-size: 16px; line-height: 1.6; color: var(--ink); box-shadow: 0 8px 24px rgba(15,61,46,.12); animation: pop .5s .2s ease-out both; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
@media (max-width: 560px) {
  .stage-box { height: 380px; }
  .stage-captain { width: 150px; height: 180px; right: 4%; }
  .stage-captain svg { width: 150px; height: 180px; }
  .bubble { max-width: 56%; font-size: 14px; top: 8%; }
  .received { right: calc(4% + 40px); bottom: 110px; }
}

/* ---------- map ---------- */
.map-page { max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.map-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.counter b { display: block; font: 700 64px/1 Prompt, sans-serif; color: var(--sun); }
.counter span { font-size: 15px; color: #B9D8C7; }
.map-side h1 { margin: 0; font-size: 28px; }
.map-side p { margin: 0; font-size: 15px; line-height: 1.7; color: #CFE5D8; }
.region-btn { min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; font: 500 14px "IBM Plex Sans Thai", sans-serif; background: transparent;
  color: #fff; border: 1.5px solid #4E8C70; }
.region-btn[aria-pressed="true"] { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.latest { display: flex; flex-direction: column; gap: 10px; }
.latest-item { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; border: 0; background: #164B39; color: #fff;
  cursor: pointer; font: 400 14px/1.5 "IBM Plex Sans Thai", sans-serif; width: 100%; }
.latest-item i { width: 28px; height: 36px; border-radius: 6px; flex-shrink: 0; }
.latest-item span { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.latest-item span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.latest-item small { font-size: 12px; color: #B9D8C7; }
.map-box { flex: 2 1 520px; min-width: 0; position: relative; border-radius: 28px; background: #134634; overflow: hidden; height: min(820px, 150vw); }
.map-zoom { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: transform .7s cubic-bezier(.3,.7,.2,1); }
.map-canvas { position: relative; height: calc(100% - 60px); aspect-ratio: 327 / 600; }
.map-canvas svg { position: absolute; left: -3%; top: -1.6%; width: 106%; height: 103.2%; }
.pin { position: absolute; width: 22px; height: 28px; margin: -14px 0 0 -11px; padding: 0; border-radius: 5px; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3);
  cursor: pointer; transition: transform .3s; }
.pin.on { transform: scale(1.3) !important; z-index: 2; }
.pin-n { position: absolute; left: 14px; top: -10px; padding: 1px 6px; border-radius: 999px; background: var(--sun); color: var(--ink); font: 700 10px Prompt, sans-serif;
  pointer-events: none; white-space: nowrap; }
.map-legend { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 3; }
.map-legend span { padding: 8px 12px; border-radius: 10px; background: rgba(15,61,46,.85); font-size: 13px; color: #DCEFE3; }
.map-legend button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: #fff; color: var(--forest); font: 600 14px "IBM Plex Sans Thai", sans-serif; cursor: pointer; }
.reader { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(340px, 86%); z-index: 4; animation: popc .45s .35s ease-out both; }
@keyframes popc { 0% { transform: translate(-50%,-50%) scale(.6); opacity: 0 } 100% { transform: translate(-50%,-50%) scale(1); opacity: 1 } }
.reader-card { aspect-ratio: 3 / 4; border-radius: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.reader-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.reader-nav button { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: #fff; color: var(--forest); font: 600 14px "IBM Plex Sans Thai", sans-serif; cursor: pointer; }
.reader-nav button.x { background: rgba(255,255,255,.18); color: #fff; }
.reader-nav span { font-size: 13px; color: #DCEFE3; }
.empty-map { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #CFE5D8; pointer-events: none; }
.map-off { max-width: 720px; margin: 0 auto; padding: 120px 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.map-off h1 { margin: 0; font-size: 34px; }
.map-off p { margin: 0; font-size: 17px; line-height: 1.7; color: #CFE5D8; }

/* ---------- admin ---------- */
.adm-shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.adm-nav { flex: 1 1 220px; max-width: 100%; background: var(--forest); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.adm-nav .logo { padding: 0 8px 18px; }
.adm-nav .logo-mark { background: var(--sun); color: var(--forest); width: 38px; height: 38px; }
.adm-nav a, .adm-nav button { padding: 12px; border-radius: 10px; color: #CFE5D8; text-decoration: none; background: none; border: 0; text-align: left;
  font: 400 15px "IBM Plex Sans Thai", sans-serif; cursor: pointer; width: 100%; }
.adm-nav a.on { background: #1E5541; color: #fff; font-weight: 600; }
.adm-main { flex: 999 1 560px; min-width: 0; padding: 24px clamp(16px, 3vw, 36px) 40px; display: flex; flex-direction: column; gap: 22px; }
.adm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.adm-head h1 { margin: 0; font-size: 28px; color: var(--forest); }
.adm-head .sub { font-size: 14px; color: var(--muted); }
.tag { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: #FFF1C7; color: #6B5210; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.box { background: #fff; border-radius: 18px; padding: 20px; border: 1px solid #E2E6E1; min-width: 0; }
.box h2 { margin: 0 0 12px; font-size: 18px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.kpi span { font-size: 14px; color: var(--muted); }
.kpi b { font: 700 34px Prompt, sans-serif; color: var(--forest); }
.kpi small { font-size: 13px; color: var(--muted); }
.adm-row { display: flex; flex-wrap: wrap; gap: 18px; }
.adm-row > .box { flex: 1 1 300px; }
.adm-row > .box.wide { flex: 2 1 420px; }
.chart { display: flex; gap: 10px; height: 220px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted-2); padding-bottom: 22px; text-align: right; width: 40px; }
.chart-plot { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.bars { flex-grow: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #C9D1CB; background: linear-gradient(#EEF1EE 1px, transparent 1px) 0 0/100% 50%; }
.bars button { flex: 1 1 0; height: 100%; padding: 0 1px; border: 0; background: transparent; display: flex; align-items: flex-end; cursor: default; min-width: 0; }
.bars button span { display: block; width: 100%; max-width: 28px; margin: 0 auto; border-radius: 4px 4px 0 0; background: #5DAF86; min-height: 1px; }
.bars button.on span, .bars button:hover span, .bars button:focus span { background: var(--forest); }
.chart-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-2); padding-top: 6px; }
.meter { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.meter div:first-child { display: flex; justify-content: space-between; font-size: 14px; }
.meter .track { height: 10px; border-radius: 6px; background: #EEF1EE; }
.meter .track i { display: block; height: 10px; border-radius: 6px; background: #3F7FB0; }
.meter.green .track { height: 6px; } .meter.green .track i { height: 6px; background: #5DAF86; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #EEF1EE; font-size: 14px; color: #33473D; flex-wrap: wrap; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF1EE; }
.toggle-row div { display: flex; flex-direction: column; gap: 2px; }
.toggle-row span { font-weight: 600; font-size: 15px; }
.toggle-row small { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #AEB8B2; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.switch input:checked + i { background: #2E7D57; }
.switch input:checked + i::after { left: 25px; }
.switch input:focus-visible + i { outline: 3px solid var(--sun); outline-offset: 2px; }
.seg-radio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: #EEF2EE; border-radius: 12px; padding: 4px; }
.seg-radio label { position: relative; min-height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; }
.seg-radio input:checked + span { color: var(--forest); font-weight: 600; }
.seg-radio label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; padding: 10px 8px; }
table.list td { padding: 12px 8px; border-top: 1px solid #EEF1EE; vertical-align: top; }
table.list td.nowrap { white-space: nowrap; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-block; }
.b-neg { background: #FDECEA; color: #8C2A20; } .b-pii { background: #FFF1C7; color: #6B5210; } .b-rude { background: #EDE7F6; color: #4B2C7F; }
.b-image, .b-offtopic, .b-other { background: #E8EEF4; color: #2B4560; } .b-pending { background: #EAF3FA; color: #1E3A5F; }
.b-published { background: #DCEFE3; color: #1F5F40; } .b-hidden { background: #EEF1EE; color: #33473D; } .b-blocked { background: #FDECEA; color: #8C2A20; }
.act { display: flex; gap: 6px; flex-wrap: wrap; }
.act form { margin: 0; }
.act button { min-height: 36px; padding: 0 12px; border-radius: 10px; font: 600 13px "IBM Plex Sans Thai", sans-serif; cursor: pointer; }
.act .ok { border: 1.5px solid #2E7D57; background: #fff; color: #1F5F40; }
.act .no { border: 0; background: #EEF1EE; color: #33473D; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; display: block; margin-top: 6px; }
.detail { display: block; font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-size: 14px; }
.warn { padding: 12px 14px; border-radius: 12px; background: #FFF6DE; color: #5A4610; font-size: 14px; }

/* ---------- simple pages ---------- */
.msg { max-width: 640px; margin: 0 auto; padding: 96px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.msg h1 { margin: 0; font-size: 32px; color: var(--forest); }
.msg p { margin: 0; font-size: 17px; color: #33473D; line-height: 1.7; }
.doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 72px; line-height: 1.8; }
.doc h1 { color: var(--forest); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .strip-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}
