/* THEEKHEE app shell — the iPhone layout around the unchanged web app.
   Everything here is drawn with THEEKHEE's own tokens (styles.css :root), its icons and its
   components. Nothing introduces a colour, font or radius the website does not already use. */

:root{
  --tk-tabbar-h:64px;
  --tk-bottom:calc(var(--tk-tabbar-h) + env(safe-area-inset-bottom));
  --tk-offline-h:0px;
  /* same red as the hero "ไม่ไหวแล้ว" button (.btn-emergency) */
  --tk-em-red:#E53935;
  --tk-em-red-active:#C62828;
  --tk-touch:44px;
  --tk-glass:rgba(244,246,243,.86);
  --tk-bar:rgba(255,255,255,.94);
}

body.tk-app{
  -webkit-tap-highlight-color:transparent;
  -webkit-touch-callout:none;
  -webkit-user-select:none;user-select:none;
  overscroll-behavior-y:none;
}
body.tk-app input,body.tk-app textarea,body.tk-app select{-webkit-user-select:text;user-select:text}
/* Installed from the browser, THEEKHEE should hold still like an app: pulling down past the
   top used to drag the whole page — the screen's title with it — and spring back. On a phone
   the page that scrolls is <html>, not <body>, so the rule above alone never reached it.
   In a browser tab this is left alone: there, pulling down is how people reload. */
html[data-tk-installed][data-tk-layout="app"],
html[data-tk-installed][data-tk-layout="app"] body{overscroll-behavior-y:none;touch-action:pan-x pan-y}
body.tk-app.tk-is-offline{--tk-offline-h:48px}

/* ---------- web chrome the app replaces ---------- */
body.tk-app .site-header,
body.tk-app .site-footer,
body.tk-app #fullMapBack{display:none!important}

/* ---------- screens ---------- */
.tk-screen{display:none;padding:16px var(--gutter) calc(var(--tk-bottom) + 96px)}
body.tk-app[data-tk-tab="home"] #tkHome,
body.tk-app[data-tk-tab="search"] #tkSearch,
body.tk-app[data-tk-tab="profile"] #tkProfile,
body.tk-app[data-tk-tab="health"] #tkHealth{display:block}

body.tk-app main > section{display:none}
body.tk-app:not([data-tk-tab="hall"]):not([data-tk-tab="about"]) main{display:none}
body.tk-app[data-tk-tab="hall"] main{display:flex;flex-direction:column}
body.tk-app[data-tk-tab="hall"] main > #hall{display:block;order:1}
body.tk-app[data-tk-tab="hall"] main > #points{display:block;order:2}
body.tk-app[data-tk-tab="hall"] main > #community{display:block;order:3}
body.tk-app[data-tk-tab="about"] main > #how,
body.tk-app[data-tk-tab="about"] main > #pin,
body.tk-app[data-tk-tab="about"] main > #faq{display:block}
body.tk-app main{padding-bottom:calc(var(--tk-bottom) + 96px)}
body.tk-app .section{padding-top:28px;padding-bottom:28px}
body.tk-app .section-heading h2{font-size:26px}
body.tk-app .eyebrow{white-space:nowrap}
body.tk-app[data-tk-tab="about"] .section-heading.center{text-align:left}
/* Hall of Fame: every heading and paragraph centred */
body.tk-app[data-tk-tab="hall"] .section-heading{text-align:center;margin-left:auto;margin-right:auto}

/* stat cards: the web lays four side by side; on a phone they read as a 2×2 grid */
body.tk-app #communityStats{grid-template-columns:1fr 1fr;gap:12px}
body.tk-app[data-tk-tab="hall"] .stat-block{
  align-items:center;justify-content:center;text-align:center;
  gap:6px;padding:20px 12px;
}
body.tk-app[data-tk-tab="hall"] .stat-block .sticker{width:38px;height:38px;margin-bottom:4px}
body.tk-app[data-tk-tab="hall"] .stat-block .value{font-size:30px}
body.tk-app[data-tk-tab="hall"] .stat-block .label{font-size:14px;line-height:1.4}
body.tk-app[data-tk-tab="hall"] .stat-block .sublabel{font-size:12px;line-height:1.4}

.tk-enter{animation:tk-enter var(--dur-slow) var(--ease-out-soft)}
@keyframes tk-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* The map overlay stays open underneath the other tabs so it keeps its place and zoom. */
body.tk-app:not([data-tk-tab="map"]) #fullMap{display:none!important}
body.tk-app:not([data-tk-tab="map"]).modal-open:not(:has(.pin-modal:not([hidden]))){overflow:auto}

/* ---------- app bar (search, hall, profile, about) ---------- */
.tk-appbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:center;
  min-height:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 56px);
  padding:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 6px) 64px 8px;
  background:var(--tk-glass);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid transparent;   /* no hairline (owner 15 พ.ย.); width kept so nothing shifts */
}
.tk-appbar h1{font-size:20px;line-height:1.25;letter-spacing:-.01em;text-align:center}
/* the back button keeps the left edge while the title stays centred */
.tk-back{position:absolute;left:var(--gutter);bottom:6px}
body.tk-app[data-tk-tab="map"] .tk-appbar,
body.tk-app[data-tk-tab="home"] .tk-appbar{display:none}

/* ---------- home ---------- */
/* Home has no app bar, so the clock needs its own frosted strip once the page scrolls */
.tk-status-scrim{
  position:fixed;z-index:31;left:0;right:0;top:0;
  height:env(safe-area-inset-top);
  background:var(--tk-glass);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  pointer-events:none;display:none;
}
body.tk-app[data-tk-tab="home"] .tk-status-scrim{display:block}
body.tk-app #tkHome{
  padding-top:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 20px);
  /* no floating buttons on home, so no room is kept for them */
  padding-bottom:calc(var(--tk-bottom) + 16px);
}
.tk-home-cta .city-layer{display:none}
/* hero banner: a white card, so the mascot and the headline carry the colour */
.tk-home-hero{
  position:relative;overflow:hidden;
  display:flex;align-items:flex-end;justify-content:space-between;gap:4px;
  min-height:196px;padding:22px 0 0 22px;
  background:var(--surface-card);
  border:1px solid var(--line-soft);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-card);
}
/* the same dot pattern, in the faint brand green, only behind the mascot */
.tk-hero-dots{
  position:absolute;top:0;right:0;bottom:0;width:58%;pointer-events:none;
  background-image:radial-gradient(circle at 12% 22%,var(--green-200) 0 2.5px,transparent 2.5px),radial-gradient(circle at 62% 72%,var(--green-200) 0 2.5px,transparent 2.5px);
  background-size:54px 54px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 45%);
          mask-image:linear-gradient(90deg,transparent,#000 45%);
}
.tk-home-copy{position:relative;min-width:0;padding-bottom:22px}
.tk-home-wordmark{display:block;margin-bottom:6px;font-size:15px;letter-spacing:.02em;color:var(--green-600)}
.tk-home-title{font-size:30px;line-height:1.18;letter-spacing:-.03em;color:var(--text-strong)}
.tk-accent{color:var(--green-500)}
.tk-home-chip{
  display:inline-block;margin-top:14px;padding:5px 12px;
  background:var(--green-100);color:var(--green-800);
  border-radius:var(--radius-pill);
  font-size:11px;font-weight:var(--fw-semibold);letter-spacing:.02em;white-space:nowrap;
}
.tk-where-head{margin-top:24px}
.tk-where-head h2{font-size:17px}
.tk-where-head + .tk-where-slot{margin-top:0}
.tk-home-sub{margin:6px 0 0;font-size:15px;line-height:1.55;color:var(--text-muted)}
.tk-home-emergency{display:flex;width:100%;margin-top:30px;height:64px}
.tk-home-emergency .btn-emergency__label{font-size:21px}
/* two red waves that roll out from the button's edge, in the button's own red.
   Drawn once at their full 14 px reach and then only scaled and faded: transform and opacity
   run on the graphics chip, where the old growing box-shadow repainted the button area every
   frame for as long as Home was open — about half the graphics work on Home (2026-11-02). */
.tk-home-emergency{isolation:isolate}
.tk-home-emergency::before,
.tk-home-emergency::after{
  content:"";position:absolute;inset:-14px;z-index:-1;
  border-radius:calc(var(--radius-control) + 14px);pointer-events:none;
  background:rgba(229,57,53,.26);opacity:0;will-change:transform,opacity;
  animation:tk-wave 2.4s var(--ease-out-soft) infinite;
}
.tk-home-emergency::after{animation-delay:1.2s}
/* start the size of the button itself (64 px tall + 2 × 14 → 92; ~95% across), end at full reach */
@keyframes tk-wave{
  0%{transform:scale(.95,.7);opacity:1}
  100%{transform:scale(1);opacity:0}
}
@media (prefers-reduced-motion:reduce){
  .tk-home-emergency::before,.tk-home-emergency::after{animation:none}
}
.tk-home-note{margin:20px 0 0;text-align:center;font-size:14px;color:var(--text-muted)}
/* how it works: the promo, 16:9, sound on request. On a phone: heading, then the video.
   From 900 px: the video on the left, the heading and three lines beside it, so the row
   fills the page's width instead of floating as a narrow box in the middle. */
.tk-explainer{display:grid;grid-template-areas:"head" "video"}
.tk-explainer-head{grid-area:head}
.tk-explainer-video{grid-area:video;position:relative;aspect-ratio:16/9;border-radius:var(--radius-card);overflow:hidden;background:#fff;box-shadow:var(--shadow-card)}
.tk-explainer-video video{display:block;width:100%;height:100%;object-fit:cover}
.tk-explainer-sound{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:rgba(20,38,26,.78);color:#fff;cursor:pointer}
.tk-explainer-sound svg{display:block}
.tk-explainer-sound.is-play{background:#14261A}
.tk-explainer-copy{grid-area:copy;display:none}
.tk-explainer-lead{margin:0 0 14px;font-size:17px;line-height:1.55;color:var(--text-body)}
.tk-explainer-points{margin:0;padding:0;list-style:none;display:grid;gap:10px}
.tk-explainer-points li{position:relative;padding-left:30px;font-size:15px;line-height:1.5;color:var(--text-body)}
.tk-explainer-points li::before{content:"✓";position:absolute;left:0;top:1px;width:20px;height:20px;border-radius:50%;background:var(--green-400);color:#14261A;font-size:12px;font-weight:var(--fw-semibold);line-height:20px;text-align:center}
@media (min-width:900px){
  .tk-explainer{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-areas:"video head" "video copy";grid-template-rows:auto 1fr;column-gap:40px;margin-top:36px}
  .tk-explainer-head{align-self:end;margin-top:0}
  .tk-explainer-copy{display:block}
}
#tkHome .presence{justify-content:center;margin:14px 0 0}
#tkHome .presence.is-total{align-items:center;margin:28px 0 4px}
.tk-quick{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px}
.tk-quick-card{
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;
  min-height:128px;padding:16px;margin:0;
  background:var(--surface-card);color:var(--text-body);
  border:1px solid var(--line-soft);border-radius:var(--radius-card);box-shadow:var(--shadow-card);
  font:inherit;text-align:left;cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop);
}
.tk-quick-card:active{transform:scale(var(--press-scale))}
.tk-quick-card img{width:48px;height:48px;border-radius:var(--radius-icon);margin-bottom:6px}
.tk-quick-label{font-size:16px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-quick-sub{font-size:13px;line-height:1.45;color:var(--text-muted)}

/* where am I */
.tk-where-slot{margin-top:16px}
.tk-where{
  display:flex;align-items:center;gap:12px;
  padding:14px 14px 14px 16px;
  background:var(--surface-card);border:1px solid var(--line-soft);
  border-radius:var(--radius-card);box-shadow:var(--shadow-sm);
}
.tk-where.is-ready{background:var(--surface-brand-soft);border-color:var(--line-brand)}
.tk-where.is-stacked{flex-wrap:wrap}
.tk-where-icon{width:36px;height:36px;flex:0 0 auto;border-radius:var(--radius-sm)}
.tk-where-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 200px}
.tk-where-text strong{font-size:16px;font-weight:var(--fw-semibold);color:var(--text-strong);line-height:1.4}
.tk-where-text span{font-size:13px;line-height:1.5;color:var(--text-muted)}
.tk-where-actions{display:flex;gap:8px;width:100%;padding-left:48px}
.tk-where-actions .btn{flex:1 1 0}
.tk-icon-btn{
  display:grid;place-items:center;flex:0 0 auto;
  width:var(--tk-touch);height:var(--tk-touch);padding:0;margin:0;
  background:var(--white);color:var(--green-700);
  border:1px solid var(--line);border-radius:50%;cursor:pointer;
}
.tk-icon-btn svg{width:20px;height:20px}
.tk-icon-btn:active{transform:scale(.92)}
.tk-spinner.sm{width:32px;height:32px;margin:0 2px;flex:0 0 auto}
.tk-spinner.xs{width:16px;height:16px;border-width:2px;margin:0;display:inline-block;vertical-align:-3px}

/* section headings inside home */
.tk-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:30px 2px 10px}
.tk-section-head h2{font-size:20px;letter-spacing:-.01em}
.tk-section-hint{font-size:13px;color:var(--text-muted);white-space:nowrap}

/* smart mode */
.tk-mode-row{
  display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;
  margin:0 calc(var(--gutter) * -1);padding:2px var(--gutter) 6px;
}
.tk-mode-row::-webkit-scrollbar{display:none}
.tk-mode{flex:0 0 auto;height:40px;padding:0 14px;font-size:15px;cursor:pointer;box-shadow:var(--shadow-sm)}
.tk-mode span{font-size:17px}
.tk-mode-headline{margin:8px 2px 0;font-size:14px;line-height:1.55;color:var(--text-body)}
.tk-mode-headline strong{color:var(--text-strong)}
.tk-mode-missing{
  margin:8px 0 0;padding:8px 12px;
  background:var(--sun-100);border-radius:var(--radius-sm);
  font-size:12px;line-height:1.55;color:var(--text-body);
}

/* travel */
#tkTravel{margin-top:12px}
.tk-dest-bar{height:48px;cursor:text}
.tk-dest-bar input{font-size:16px}
#tkDestResults{margin-top:8px}
.tk-trip{
  display:flex;align-items:center;gap:12px;padding:12px 14px;
  background:var(--sky-100);border-radius:var(--radius-card);
}
.tk-trip-icon{font-size:22px}
.tk-trip-text{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0;font-size:13px;color:var(--text-body)}
.tk-trip-text strong{font-size:15px;color:var(--text-strong)}
.tk-trip-note{display:flex;align-items:center;gap:8px;margin:6px 4px 0;font-size:14px;color:var(--text-muted)}
.tk-place-emoji{width:30px;text-align:center;font-size:20px;flex:0 0 auto}
.tk-link-btn{
  flex:0 0 auto;min-height:var(--tk-touch);padding:0 6px;margin:0;
  background:none;border:0;font:inherit;font-size:15px;font-weight:var(--fw-semibold);
  color:var(--text-link);cursor:pointer;
}

/* recommendations */
.tk-nearby-scope{margin:-4px 2px 10px;font-size:13px;color:var(--text-muted)}
.tk-open-filter{display:flex;margin:-2px 0 12px}
.tk-open-filter .tag{gap:6px}
.tk-rec{
  margin:0 0 12px;padding:16px;
  background:var(--surface-card);border:1px solid var(--line-soft);
  border-radius:var(--radius-card);box-shadow:var(--shadow-card);
}
.tk-rec:first-of-type{border-color:var(--line-brand)}
.tk-rec-head{display:flex;align-items:flex-start;gap:12px}
.tk-rec-pin{width:34px;height:auto;flex:0 0 auto}
.tk-rec-title{flex:1 1 auto;min-width:0}
.tk-rec-title h3{font-size:17px;line-height:1.35}
.tk-rec-area{margin:1px 0 0;font-size:13px;line-height:1.45;color:var(--text-muted)}
.tk-nearby-note{
  margin:0 0 12px;padding:10px 12px;
  background:var(--sky-100);border-radius:var(--radius-sm);
  font-size:13px;line-height:1.55;color:var(--text-body);
}
.tk-nearby-note .tk-link-btn{min-height:0;padding:0;font-size:13px}
.tk-rec-meta{margin:2px 0 0;font-size:13px;font-weight:var(--fw-semibold);color:var(--green-700)}
.tk-rec-eta{font-weight:var(--fw-medium);color:var(--text-muted)}
.tk-rec-badge{
  flex:0 0 auto;padding:3px 10px;border-radius:var(--radius-pill);
  background:var(--green-400);color:var(--green-900);
  font-size:12px;font-weight:var(--fw-semibold);white-space:nowrap;
}
.tk-rec-score{display:flex;align-items:center;gap:6px;margin:12px 0 0;font-size:13px;color:var(--text-muted)}
.tk-rec-score b{font-size:15px;color:var(--text-strong)}
.tk-rec-fac{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.tk-rec-fac li{
  display:inline-flex;align-items:center;gap:5px;padding:4px 10px 4px 5px;
  border-radius:var(--radius-pill);background:var(--status-clean-bg);
  font-size:13px;font-weight:var(--fw-semibold);line-height:1.2;color:var(--green-800);
}
.tk-rec-fac li.is-text{padding-left:10px}
.tk-rec-fac img{width:22px;height:22px;flex:0 0 auto}
.tk-rec-fac.is-clipped li.is-more{display:none}
.tk-rec-fac:not(.is-clipped) li.tk-rec-fac-more{display:none}
.tk-rec-fac li.tk-rec-fac-more{padding:0;background:none}
.tk-rec-fac-more button{
  min-width:44px;height:32px;padding:0 12px;border:1px solid var(--line-brand);
  border-radius:var(--radius-pill);background:var(--surface-card);
  font:inherit;font-size:13px;font-weight:var(--fw-semibold);color:var(--green-800);cursor:pointer;
}
.tk-rec-unknown{margin:12px 0 0;font-size:13px;line-height:1.5;color:var(--text-muted)}
.tk-rec-why{margin:12px 0 6px;font-size:12px;font-weight:var(--fw-semibold);letter-spacing:.04em;color:var(--text-muted)}
.tk-reasons{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.tk-reasons li{
  padding:6px 10px;border-radius:var(--radius-sm);
  font-size:13px;line-height:1.5;color:var(--text-body);background:var(--bg-page);
}
.tk-reasons li.is-good{background:var(--status-clean-bg);color:var(--green-800)}
.tk-reasons li.is-warn{background:var(--status-okay-bg);color:var(--text-strong)}
.tk-rec-missing{margin:8px 2px 0;font-size:12px;line-height:1.5;color:var(--text-muted)}
.tk-rec-actions{display:flex;gap:8px;margin-top:12px}
.tk-rec-actions .btn{flex:1 1 0;height:var(--tk-touch)}
.tk-nearby-more{display:block;margin:0 auto}

/* illustrations from the web page's hero and closing block */
/* the web sets padding-top:0 inline on this section, so the gap is a margin */
body.tk-app .tk-home-cta.section{padding:0;margin-top:20px}
.tk-home-cta .container{padding-left:0;padding-right:0}
/* white card, like the hero: the mascot and the words carry the colour */
.tk-home-cta .final-cta{
  margin:0;padding:24px 18px 22px;
  background:var(--surface-card);
  border:1px solid var(--line-soft);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-card);
}
.tk-home-cta .final-cta .dots{
  opacity:1;
  background-image:radial-gradient(circle at 12% 22%,var(--green-100) 0 2.5px,transparent 2.5px),radial-gradient(circle at 62% 72%,var(--green-100) 0 2.5px,transparent 2.5px);
}
.tk-home-cta .final-cta h2{font-size:24px;color:var(--text-strong)}
.tk-home-cta .final-cta .lede{font-size:15px;color:var(--text-muted);opacity:1}
.tk-home-cta .final-cta .btn-secondary{border-color:var(--line)}
.tk-home-cta .final-cta .content .scene{margin-bottom:20px}
.tk-home-cta .final-cta .mascot{width:64px;margin-bottom:14px}
.tk-home-cta .final-cta .cta-row{flex-direction:column;gap:10px}
.tk-home-cta .final-cta .cta-row .btn{width:100%}

/* ---------- search ---------- */
body.tk-app #tkSearch{padding-top:12px}
.tk-search-bar{height:48px;margin-bottom:4px;cursor:text}
.tk-search-bar input{font-size:16px}
.tk-place{
  display:flex;align-items:center;gap:12px;width:100%;min-height:64px;
  padding:12px 14px;margin:0;
  background:var(--surface-card);border:0;border-radius:20px;
  box-shadow:none;
  font:inherit;text-align:left;cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop);
}
.tk-place:active{transform:scale(.985)}
.tk-place-pin{width:30px;height:auto;flex:0 0 auto}
.tk-place-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}
.tk-place-name{font-size:16px;font-weight:var(--fw-semibold);color:var(--text-strong);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-place-sub{font-size:13px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-place-distance{flex:0 0 auto;font-size:13px;font-weight:var(--fw-semibold);color:var(--green-700)}
.tk-place .tk-chevron{margin-left:0}

/* ---------- states: empty · error · offline ---------- */
.tk-state{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  margin:24px 0 0;padding:28px 20px;text-align:center;
  background:var(--surface-card);border:1px solid var(--line-soft);
  border-radius:var(--radius-card);box-shadow:var(--shadow-sm);
}
.tk-state-art{width:72px;height:auto;margin-bottom:4px}
.tk-state h3{font-size:19px}
.tk-state p{margin:0 0 6px;font-size:15px;line-height:1.6;color:var(--text-muted)}
.tk-spinner{
  width:34px;height:34px;margin-bottom:6px;border-radius:50%;
  border:3px solid var(--green-100);border-top-color:var(--green-500);
  animation:tk-spin .9s linear infinite;
}
@keyframes tk-spin{to{transform:rotate(360deg)}}
body.tk-app.tk-map-failed[data-tk-tab] .tk-fab--pin{display:none}
.tk-map-state{
  position:fixed;z-index:1945;left:var(--gutter);right:var(--gutter);
  top:calc(env(safe-area-inset-top) + 120px);margin:0;
}

.tk-offline{
  position:fixed;z-index:1960;left:12px;right:12px;
  top:calc(env(safe-area-inset-top) + 4px);
  display:flex;align-items:center;gap:10px;min-height:40px;padding:6px 12px;
  background:var(--sun-100);color:var(--text-body);
  border:1px solid var(--sun-400);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);
  font-size:13px;line-height:1.4;
}
.tk-offline img{width:24px;height:24px;border-radius:6px;flex:0 0 auto}
.tk-offline strong{color:var(--text-strong)}
body.tk-app.tk-is-offline .full-map-controls{top:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 64px)}

/* ---------- map tab ---------- */
/* the title bar matches the other tabs: a frosted strip with the page name in the middle */
body.tk-app .full-map-top{
  top:0;left:0;right:0;justify-content:center;
  min-height:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 56px);
  padding:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 6px) 64px 8px;
  align-items:flex-end;
  background:var(--tk-glass);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid transparent;
}
body.tk-app .full-map-title{
  height:auto;padding:0;background:none;border:0;box-shadow:none;
  font-size:20px;line-height:1.25;font-weight:var(--fw-bold);letter-spacing:-.01em;
}
body.tk-app .full-map-controls{top:calc(env(safe-area-inset-top) + var(--tk-offline-h) + 64px)}
body.tk-app .full-map-sheet{bottom:calc(var(--tk-bottom) + 12px)}
body.tk-app .full-map .leaflet-bottom{bottom:var(--tk-bottom)}

/* search, then every filter on one row you swipe sideways */
.tk-filter-row{
  display:flex;align-items:center;gap:8px;
  overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  margin:0 -12px;padding:2px 12px 6px;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 12px,#000 calc(100% - 28px),transparent 100%);
          mask-image:linear-gradient(90deg,transparent 0,#000 12px,#000 calc(100% - 28px),transparent 100%);
}
.tk-filter-row::-webkit-scrollbar{display:none}
.tk-filter-row .full-map-filters{flex:0 0 auto;overflow:visible;padding:0}
.tk-filter-divider{flex:0 0 auto;width:1px;height:20px;background:var(--line-strong)}
.tk-filter-row:has(#fullMapFacilities[hidden]) .tk-filter-divider{display:none}
body.tk-app .full-map-filters .tag{height:36px;padding:0 13px;font-size:14px}

/* pinch does the zooming on a phone */
body.tk-app #fullMap .leaflet-control-zoom{display:none}
/* the licence credit keeps its corner; the "showing N of M" note sits one line below it */
body.tk-app #fullMap .leaflet-control-attribution{font-size:10px;padding:1px 6px;border-radius:var(--radius-xs) 0 0 var(--radius-xs)}
body.tk-app .map-cap-note{
  top:calc(var(--map-controls-h, 104px) + 40px);
  max-width:calc(100% - 32px);white-space:nowrap;
  padding:5px 12px;font-size:12px;
}

/* ---------- floating actions ---------- */
.tk-fabs{
  position:fixed;z-index:1940;right:16px;
  bottom:calc(var(--tk-bottom) + 16px);
  display:flex;flex-direction:column;align-items:flex-end;gap:12px;
  pointer-events:none;
  transition:bottom var(--dur-base) var(--ease-out-soft);
}
.tk-fab{pointer-events:auto;margin:0;cursor:pointer;font:inherit;
  transition:transform var(--dur-fast) var(--ease-pop),background var(--dur-fast) var(--ease-standard)}
.tk-fab:active{transform:scale(var(--press-scale))}
.tk-fab--emergency{
  display:inline-flex;align-items:center;gap:8px;
  height:52px;padding:0 20px 0 14px;
  background:var(--tk-em-red);color:#FFFFFF;
  border:0;border-radius:var(--radius-pill);
  box-shadow:0 10px 22px -8px rgba(229,57,53,.65);
  font-size:17px;font-weight:var(--fw-bold);letter-spacing:-.01em;
}
.tk-fab--emergency:active{background:var(--tk-em-red-active)}
.tk-fab-icon{display:inline-flex}
.tk-fab-icon svg{width:24px;height:24px}
/* A round icon on a map is a guess: a pin, a place, a plus, who knows. With room for
   words it says what it does. Green, not red — the red one is for emergencies. */
.tk-fab--pin{
  display:none;align-items:center;gap:8px;
  height:52px;padding:0 20px 0 12px;
  background:var(--green-500);color:#FFFFFF;
  border:0;border-radius:var(--radius-pill);box-shadow:var(--shadow-map);
  font-size:16px;font-weight:var(--fw-bold);letter-spacing:-.01em;
}
@media (hover:hover){.tk-fab--pin:hover{background:var(--green-600)}}
.tk-fab--pin img{width:28px;height:28px;border-radius:8px}
body.tk-app[data-tk-tab="home"] .tk-fabs{display:none}
body.tk-app[data-tk-tab="map"] .tk-fab--pin{display:inline-flex}
/* my location: the same round button, just above the pin */
.tk-fab--locate{
  display:none;place-items:center;width:52px;height:52px;padding:0;
  background:var(--surface-card);color:var(--text-strong);
  border:1px solid var(--line);border-radius:50%;box-shadow:var(--shadow-map);
}
.tk-fab--locate svg{width:24px;height:24px}
body.tk-app[data-tk-tab="map"] .tk-fab--locate{display:grid}
body.tk-app.tk-map-failed[data-tk-tab] .tk-fab--locate{display:none}
body.tk-app[data-tk-tab="map"] .tk-fabs{bottom:calc(var(--tk-bottom) + 16px + var(--tk-sheet-h, 0px))}

/* ---------- sheets: a grabber and a rise, the way sheets move on iPhone ---------- */
body.tk-app .pin-modal-sheet{
  max-height:calc(100% - env(safe-area-inset-top) - 16px);
  animation:tk-sheet-in var(--dur-slow) var(--ease-out-soft);
}
body.tk-app .pin-modal-sheet::before{
  content:"";display:block;flex:0 0 auto;
  width:40px;height:5px;margin:8px auto 0;
  border-radius:var(--radius-pill);background:var(--line);
}
body.tk-app .pin-modal-backdrop{animation:tk-fade var(--dur-base) var(--ease-standard)}
@keyframes tk-sheet-in{from{transform:translateY(40px);opacity:.5}to{transform:none;opacity:1}}
@keyframes tk-fade{from{opacity:0}to{opacity:1}}

/* "ไม่ไหวแล้ว" pops up in the middle of the screen instead of rising as a sheet */
body.tk-app .emergency-modal{align-items:center;justify-content:center;padding:20px}
body.tk-app .emergency-modal .pin-modal-sheet{
  max-width:420px;max-height:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 40px);
  border-radius:var(--radius-xl);
  animation:tk-pop var(--dur-slow) var(--ease-pop);
}
body.tk-app .emergency-modal .pin-modal-sheet::before{display:none}
/* heading and question centred and close together; the close button keeps its corner */
body.tk-app .emergency-modal .pin-modal-head{
  position:relative;justify-content:center;text-align:center;
  padding:22px 56px 0;
}
body.tk-app .emergency-modal .pin-modal-close{position:absolute;top:14px;right:14px}
body.tk-app .emergency-modal .pin-modal-body{padding-top:6px}
body.tk-app .emergency-modal #emergencyChoose > .pin-hint{margin:0 0 14px;text-align:center}
body.tk-app .emergency-modal .emergency-busy{text-align:center}
body.tk-app .emergency-modal .pin-modal-foot{padding-bottom:20px}
@keyframes tk-pop{from{transform:scale(.88);opacity:0}to{transform:none;opacity:1}}

body.tk-app .toast{bottom:calc(var(--tk-bottom) + 16px)}

/* ---------- profile ---------- */
.tk-profile{
  display:flex;align-items:center;gap:14px;width:100%;
  padding:18px;margin:0;
  background:var(--surface-card);color:var(--text-body);
  border:1px solid var(--line-soft);border-radius:var(--radius-card);box-shadow:var(--shadow-card);
  font:inherit;text-align:left;cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop);
}
.tk-profile:active{transform:scale(var(--press-scale))}
.tk-profile-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.tk-profile-name{font-size:19px;font-weight:var(--fw-bold);letter-spacing:-.01em;color:var(--text-strong)}
.tk-profile-sub{font-size:14px;color:var(--text-muted)}
.tk-points{font-weight:var(--fw-semibold);color:var(--green-700)}
.tk-chevron{margin-left:auto;flex:0 0 auto;color:var(--text-faint);font-size:26px;line-height:1}

.tk-group-title{
  margin:26px 6px 8px;
  font-size:var(--type-eyebrow-size);letter-spacing:var(--type-eyebrow-ls);
  font-weight:var(--fw-semibold);color:var(--text-muted);
}
/* one column that may shrink: an auto column grows to fit a long name that does not wrap (a place
   name with an ellipsis), and the row then runs off a phone screen (search results, หมุดของคุณ) */
.tk-list{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;background:none;border:0;border-radius:0;box-shadow:none;overflow:visible}
.tk-card-soft{
  background:var(--surface-card);border:0;border-radius:20px;
  box-shadow:none;
  transition:transform var(--dur-fast) var(--ease-pop),box-shadow var(--dur-fast) var(--ease-standard);
}
.tk-row{
  display:flex;align-items:center;gap:14px;width:100%;min-height:62px;
  padding:12px 16px;margin:0;
  background:var(--surface-card);border:0;border-radius:20px;
  box-shadow:none;
  font:inherit;font-size:16px;font-weight:var(--fw-medium);color:var(--text-strong);
  text-align:left;cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop);
}
.tk-row:active{transform:scale(.985)}
.tk-row img{width:36px;height:36px;flex:0 0 auto;border-radius:12px}
.tk-row .tk-count{margin-left:auto;font-size:14px;color:var(--text-muted)}
.tk-row .tk-count + .tk-chevron{margin-left:6px}

.tk-tagline{margin:32px 12px 0;text-align:center;font-size:14px;color:var(--text-muted)}
.tk-meta{margin:6px 12px 0;text-align:center;font-size:12px;line-height:1.6;color:var(--text-faint)}
.tk-meta a{color:inherit}

/* ---------- tab bar ---------- */
.tk-tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:1950;
  display:grid;grid-template-columns:repeat(5,1fr);align-items:start;
  height:var(--tk-bottom);
  padding:0 4px env(safe-area-inset-bottom);
  background:var(--tk-bar);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-top:1px solid transparent;
  box-shadow:none;
}
.tk-tab{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  min-width:0;height:var(--tk-tabbar-h);padding:0;margin:0;
  background:none;border:0;
  font:inherit;font-size:11px;font-weight:var(--fw-semibold);line-height:1.2;
  color:var(--text-muted);cursor:pointer;
}
.tk-tab-label{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-tab-icon{
  display:grid;place-items:center;width:48px;height:30px;
  border-radius:var(--radius-pill);
  transition:background var(--dur-base) var(--ease-standard),transform var(--dur-fast) var(--ease-pop);
}
.tk-tab-icon svg{
  width:24px;height:24px;
  fill:none;stroke:var(--ink-400);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  transition:stroke var(--dur-base) var(--ease-standard);
}
.tk-tab.is-active{color:var(--green-700)}
.tk-tab.is-active .tk-tab-icon{background:var(--green-100)}
.tk-tab.is-active .tk-tab-icon svg{stroke:var(--green-600);stroke-width:2.1}
.tk-tab:active .tk-tab-icon{transform:scale(.9)}

/* ---------- settings: theme + language ---------- */
.tk-settings{padding:4px 0}
.tk-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px 10px 16px}
.tk-setting + .tk-setting{border-top:1px solid var(--line-soft)}
.tk-setting-label{font-size:16px;font-weight:var(--fw-medium);color:var(--text-strong)}
.tk-setting-hint{margin:-4px 16px 8px;font-size:12px;color:var(--text-muted)}
.tk-seg{
  display:inline-flex;flex:0 0 auto;padding:3px;gap:2px;
  background:var(--bg-sunken);border-radius:var(--radius-pill);
}
.tk-seg-btn{
  min-width:56px;height:34px;padding:0 12px;margin:0;
  background:none;border:0;border-radius:var(--radius-pill);
  font:inherit;font-size:14px;font-weight:var(--fw-semibold);color:var(--text-muted);
  cursor:pointer;transition:background var(--dur-base) var(--ease-standard),color var(--dur-base) var(--ease-standard);
}
.tk-seg-btn.is-on{background:var(--surface-card);color:var(--green-700);box-shadow:var(--shadow-sm)}

/* ---------- Premium: "ไม่ไหวแล้ว · แนะนำแบบไหน" (features.js) ---------- */
.tk-sos-box{padding:14px 16px 16px}
.tk-sos-hint{margin:0 0 12px;font-size:13px;line-height:1.5;color:var(--text-muted)}
.tk-sos-chips{display:flex;flex-wrap:wrap;gap:8px}
.tk-sos-chips .tag{cursor:pointer;height:38px}
.tk-sos-chips .tag.is-locked{color:var(--text-muted);background:var(--bg-sunken);border-color:transparent}

/* ---------- dark theme ----------
   THEEKHEE's greens stay; the page, the cards and the ink turn to deep green-black.
   Bright green buttons keep their dark text, since they sit on the brand green. */
html[data-tk-theme="dark"]{
  color-scheme:dark;
  --white:#17221B;
  --ink-900:#EEF3EE;--ink-800:#DCE4DD;--ink-700:#C9D3CB;--ink-600:#AAB6AD;--ink-500:#93A198;
  --ink-400:#6F7D74;--ink-300:#4B5A50;--ink-200:#2E3D33;--ink-100:#243128;--ink-50:#0E1611;
  --bg-sunken:#0A110D;
  --green-50:#16261A;--green-100:#1D3522;--green-200:#27472D;--green-300:#3F6B2C;
  --green-600:#74CF4E;--green-700:#8FDF6C;--green-800:#B5EA9C;
  --sun-100:#2E2710;--coral-100:#33201B;--sky-100:#122A33;
  --surface-ink:#0A2413;
  --text-on-ink:#FFFFFF;
  --line-brand:#3F6B2C;
  --shadow-hairline:0 0 0 1px var(--line-soft);
  --shadow-sm:0 0 #0000;
  --shadow-card:0 0 #0000;
  --shadow-raised:0 0 #0000;
  --shadow-map:0 1px 2px rgba(0,0,0,.4),0 4px 12px -4px rgba(0,0,0,.6);
  --shadow-float:0 8px 16px -8px rgba(0,0,0,.5),0 32px 64px -24px rgba(0,0,0,.7);
  --tk-glass:rgba(14,22,17,.86);
  --tk-bar:rgba(23,34,27,.94);
}
/* text that used the white token as a colour */
html[data-tk-theme="dark"] .btn-ink,
html[data-tk-theme="dark"] .badge-ink,
html[data-tk-theme="dark"] .toast,
html[data-tk-theme="dark"] .wordmark.on-ink .wordmark-text{color:#FFFFFF}
html[data-tk-theme="dark"] .btn-ink{background:#1F5A2E}
html[data-tk-theme="dark"] .user-dot{border-color:#FFFFFF}
/* dark-green words on light-green chips become light green on dark-green chips */
html[data-tk-theme="dark"] .tag.is-selected,html[data-tk-theme="dark"] .badge-clean,html[data-tk-theme="dark"] .review-item .avatar,html[data-tk-theme="dark"] .pin-status.is-ok,html[data-tk-theme="dark"] .donate-merit-title,html[data-tk-theme="dark"] .donate-merit li,html[data-tk-theme="dark"] .facility-option[aria-pressed="true"],html[data-tk-theme="dark"] .pin-kinds .pin-kind[aria-checked="true"],html[data-tk-theme="dark"] .facility-mini,html[data-tk-theme="dark"] .hall-avatar,html[data-tk-theme="dark"] .hall-badge,html[data-tk-theme="dark"] .changelog-now,html[data-tk-theme="dark"] .btn.is-saved,html[data-tk-theme="dark"] .review-cta,html[data-tk-theme="dark"] .tk-home-cta .final-cta h2{color:var(--green-800)}@media (hover:hover){html[data-tk-theme="dark"] .hall-you-link:hover{color:var(--green-800)}}
html[data-tk-theme="dark"] .tk-home-cta .final-cta h2{color:var(--text-strong)}
html[data-tk-theme="dark"] .leaflet-control-attribution{background:rgba(23,34,27,.86);color:var(--text-muted)}
html[data-tk-theme="dark"] .leaflet-control-attribution a{color:var(--green-700)}
html[data-tk-theme="dark"] .full-map{background:var(--bg-sunken)}
/* illustrations are bright artwork: a touch dimmer at night */
html[data-tk-theme="dark"] .scene img,
html[data-tk-theme="dark"] .final-cta .scene img{filter:brightness(.88)}
html[data-tk-theme="dark"] .tk-offline{background:var(--sun-100);border-color:#7A5A12}

/* ---------- premium ---------- */
.tk-home-chip{display:inline-flex;align-items:center;gap:5px;border:0;font-family:inherit;line-height:1.3}
.tk-home-chip .tk-star{width:12px;height:12px;flex:0 0 auto;color:var(--sun-600)}
.tk-premium-chip{cursor:pointer}
.tk-premium-chip:active{transform:scale(var(--press-scale))}
.tk-home-chip.is-premium{background:var(--sun-100);color:var(--ink-900)}
.tk-mode .tk-lock{width:13px;height:13px;margin-left:5px;color:var(--text-faint);flex:0 0 auto}
.tk-mode.is-locked{color:var(--text-muted)}

.tk-premium-modal .pin-modal-head h3{margin-top:10px}
.tk-premium-badge{
  display:inline-flex;align-items:center;gap:6px;padding:5px 12px;
  background:var(--sun-100);color:var(--ink-900);border-radius:var(--radius-pill);
  font-size:12px;font-weight:var(--fw-bold);letter-spacing:.04em;
}
.tk-premium-badge .tk-star{width:14px;height:14px;color:var(--sun-600)}
.tk-premium-reason{
  margin:4px 0 12px;padding:10px 12px;text-align:center;
  background:var(--green-50);border-radius:var(--radius-md);font-size:14px;color:var(--text-body);
}
.tk-perks{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.tk-perks li{display:flex;align-items:flex-start;gap:12px}
.tk-perk-emoji{
  display:grid;place-items:center;flex:0 0 auto;width:38px;height:38px;
  background:var(--bg-sunken);border-radius:var(--radius-sm);font-size:19px;
}
.tk-perk-text{display:flex;flex-direction:column;min-width:0}
.tk-perk-text strong{font-size:15px;color:var(--text-strong)}
.tk-perk-text span{font-size:13px;line-height:1.45;color:var(--text-muted)}
.tk-premium-free-title{margin:18px 0 4px;font-size:13px;font-weight:var(--fw-semibold);color:var(--text-strong);text-align:center}
.tk-premium-free{margin:0;font-size:13px;line-height:1.55;color:var(--text-muted);text-align:center}
.tk-premium-message{margin:14px 0 0;padding:10px 12px;background:var(--sun-100);border-radius:var(--radius-md);font-size:14px;text-align:center;color:var(--text-body)}
.tk-premium-foot{flex-direction:column;align-items:stretch;gap:8px;padding-top:12px}
.tk-premium-buy{width:100%;justify-content:center;gap:10px}
.tk-premium-price{padding:2px 10px;background:rgba(18,58,30,.12);border-radius:var(--radius-pill);font-size:15px}
.tk-premium-once,.tk-premium-note{margin:0;text-align:center;font-size:12px;color:var(--text-muted)}
.tk-premium-more{display:block;margin-top:8px;text-align:center;font-size:14px;font-weight:600}
.tk-premium-busy{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px 0;font-size:14px;color:var(--text-body)}
.tk-premium-foot .tk-link-btn{align-self:center}
html[data-tk-theme="dark"] .tk-home-chip.is-premium,
html[data-tk-theme="dark"] .tk-premium-badge{color:#F5E3A8}
.tk-premium-foot > *{flex:0 0 auto}
.tk-premium-foot .btn-md{min-height:44px}
.tk-premium-modal .pin-modal-body{padding-bottom:4px}
.tk-perks{gap:10px}

/* ---------- map card: community reviews and the wrong-pin button ---------- */
/* 176px: the search bar and the filter chips end 158px from the top; a long card stops below them */
body.tk-app .full-map-sheet{
  max-height:calc(100% - var(--tk-bottom) - env(safe-area-inset-top) - 176px);
  overflow-y:auto;overscroll-behavior:contain;
}
.tk-card-community{margin-top:12px;padding-top:12px;border-top:1px solid var(--line-soft)}
.tk-cc-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.tk-cc-head strong{font-size:14px;color:var(--text-strong)}
.tk-cc-head .tk-link-btn{font-size:13px;padding:4px 0}
.tk-cc-count{display:inline-block;min-width:20px;padding:0 6px;border-radius:var(--radius-pill);background:var(--green-100);color:var(--green-800);font-size:12px;text-align:center}
.tk-crv-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.tk-crv{padding:9px 11px;background:var(--bg-page);border-radius:var(--radius-md)}
.tk-crv-top{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted)}
.tk-crv-who{font-weight:var(--fw-semibold);color:var(--text-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45%}
.tk-crv-stars{display:inline-flex;align-items:center}
.tk-crv-stars svg,.tk-crv-stars img{width:12px;height:12px}
.tk-crv-when{margin-left:auto;white-space:nowrap}
.tk-crv-text{
  margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--text-body);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.tk-cc-empty{margin:2px 0 0;font-size:13px;color:var(--text-muted)}
.tk-cc-actions{display:flex;gap:8px;margin-top:10px}
.tk-cc-btn{
  flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:38px;padding:0 10px;margin:0;cursor:pointer;
  background:var(--surface-card);color:var(--text-strong);
  border:1px solid var(--line);border-radius:var(--radius-pill);
  font:inherit;font-size:13px;font-weight:var(--fw-semibold);
}
.tk-cc-btn svg{width:16px;height:16px;flex:0 0 auto}
.tk-cc-btn.is-report{color:var(--coral-600)}
.tk-cc-btn.is-edit{color:var(--text-link)}
.tk-cc-btn:active{transform:scale(var(--press-scale))}
body.tk-app .full-map-sheet .card-actions{margin-top:12px}
/* a tall card would push the round buttons up over the search bar: they step aside while it is open */
body.tk-app.tk-sheet-open[data-tk-tab="map"] .tk-fabs{opacity:0;pointer-events:none}
body.tk-app.tk-sheet-open[data-tk-tab="map"] .tk-fabs .tk-fab{pointer-events:none}
.tk-fabs{transition:bottom var(--dur-base) var(--ease-out-soft),opacity var(--dur-fast) var(--ease-standard)}
/* The name down to the cleanliness stars stays in place; only what is under it scrolls.
   So the card inside scrolls, not the sheet, and the close button stays with the head. */
body.tk-app .full-map-sheet{display:flex;flex-direction:column;overflow:hidden}
body.tk-app .full-map-sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
body.tk-app .full-map-sheet .toilet-card .thumb{position:sticky;top:0;align-self:flex-start}
body.tk-app .full-map-sheet .card-head{position:sticky;top:0;z-index:2;background:var(--surface-card);padding-bottom:2px}
/* above the head, whose background would otherwise paint over it */
body.tk-app .full-map-sheet-close{z-index:3}
/* the close button is 44px here: the name keeps clear of it, and a long one takes two lines
   instead of being cut */
body.tk-app .full-map-sheet .toilet-card .title-row{padding-right:46px}
body.tk-app .full-map-sheet .toilet-card .title-row .name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3}

/* ---------- photos ---------- */
.tk-thumbs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 0 10px}
.tk-thumbs::-webkit-scrollbar{display:none}
.tk-thumb{flex:0 0 auto;width:76px;height:76px;padding:0;margin:0;border:0;border-radius:var(--radius-md);overflow:hidden;background:var(--bg-sunken);cursor:pointer}
.tk-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.tk-thumbs.is-review{margin:8px 0 4px}
.tk-thumbs.is-review .tk-thumb{width:64px;height:64px}

.tk-viewer{
  position:fixed;inset:0;z-index:2200;display:flex;align-items:center;justify-content:center;
  background:rgba(8,14,10,.94);
  padding:calc(env(safe-area-inset-top) + 56px) 12px calc(env(safe-area-inset-bottom) + 76px);
}
.tk-viewer[hidden]{display:none}
.tk-viewer-img{max-width:100%;max-height:100%;border-radius:var(--radius-md);object-fit:contain}
.tk-viewer-close{
  position:absolute;top:calc(env(safe-area-inset-top) + 10px);right:14px;
  display:grid;place-items:center;width:40px;height:40px;padding:0;
  background:rgba(255,255,255,.14);color:#FFFFFF;border:0;border-radius:50%;cursor:pointer;
}
.tk-viewer-close svg{width:20px;height:20px}
.tk-viewer-bar{
  position:absolute;left:16px;right:16px;bottom:calc(env(safe-area-inset-bottom) + 16px);
  display:flex;align-items:center;justify-content:space-between;gap:12px;color:#FFFFFF;
}
.tk-viewer-nav{width:44px;height:44px;padding:0;background:rgba(255,255,255,.14);color:#FFFFFF;border:0;border-radius:50%;font-size:26px;line-height:1;cursor:pointer}
.tk-viewer-count{font-size:14px;opacity:.85}
.tk-viewer-report{margin-left:auto;height:40px;padding:0 16px;background:rgba(255,255,255,.14);color:#FFB4A6;border:0;border-radius:var(--radius-pill);font:inherit;font-size:14px;font-weight:var(--fw-semibold);cursor:pointer}

.tk-attach{margin-top:16px;padding-top:14px;border-top:1px solid var(--line-soft)}
.tk-attach-title{margin:0 0 8px;font-size:14px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-attach-title span{font-weight:var(--fw-regular);color:var(--text-muted);font-size:12px;margin-left:4px}
.tk-attach-row{display:flex;flex-wrap:wrap;gap:8px}
.tk-attach-item,.tk-attach-add{position:relative;width:76px;height:76px;border-radius:var(--radius-md);overflow:hidden}
.tk-attach-item img{display:block;width:100%;height:100%;object-fit:cover}
.tk-attach-item.is-uploading img,.tk-attach-item.is-error img{opacity:.45}
.tk-attach-state{position:absolute;inset:0;display:grid;place-items:center}
.tk-attach-state.is-error{color:var(--coral-600);font-size:24px;font-weight:var(--fw-bold)}
.tk-attach-remove{
  position:absolute;top:4px;right:4px;width:24px;height:24px;padding:0;
  display:grid;place-items:center;background:rgba(10,20,14,.7);color:#FFFFFF;border:0;border-radius:50%;
  font-size:16px;line-height:1;cursor:pointer;
}
.tk-attach-add{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;margin:0;
  background:var(--bg-page);color:var(--text-muted);border:1.5px dashed var(--line-strong);
  font:inherit;font-size:12px;cursor:pointer;
}
.tk-attach-add svg{width:24px;height:24px}
.tk-attach-choose{display:flex;gap:8px;margin-top:10px}
.tk-attach-choose .btn{flex:1 1 0}
.tk-attach-note{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--text-muted)}
.tk-attach-note.is-warn{color:var(--coral-600)}

/* ---------- pin modal: compact map ---------- */
body.tk-app .pin-map-wrap{height:150px;min-height:0;transition:height var(--dur-slow) var(--ease-out-soft)}
body.tk-app .pin-map-wrap.is-grown{height:min(340px,42vh)}
body.tk-app .pin-map-wrap .pin-crosshair img{width:38px;height:auto}
.tk-map-grow{
  position:absolute;top:8px;left:8px;z-index:500;
  display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 11px;margin:0;
  background:var(--surface-card);color:var(--text-strong);
  border:1px solid var(--line);border-radius:var(--radius-pill);box-shadow:var(--shadow-map);
  font:inherit;font-size:12px;font-weight:var(--fw-semibold);cursor:pointer;
}
.tk-map-grow svg{width:14px;height:14px}
body.tk-app .pin-map-wrap .pin-locate{height:32px;font-size:12px}
body.tk-app .pin-map-wrap:not(.is-grown) .leaflet-control-zoom{display:none}

/* ---------- dark theme: fixes found by the contrast audit ---------- */
html[data-tk-theme="dark"]{--ink-400:#8A988F;--ink-200:#3A4A40}
/* QR codes must stay dark-on-white or banking apps cannot read them */
html[data-tk-theme="dark"] .donate-qr img,
html[data-tk-theme="dark"] .qr-button img{background:#FFFFFF}
html[data-tk-theme="dark"] .donate-impact{background:rgba(255,197,61,.14);color:var(--text-strong)}
html[data-tk-theme="dark"] .donate-impact strong,html[data-tk-theme="dark"] .donate-qr figcaption{color:var(--green-400)}
/* the web writes a few headings with an inline dark green */
html[data-tk-theme="dark"] [style*="color:var(--green-900)"]{color:var(--text-strong)!important}
/* status colours written as fixed values for light backgrounds */
html[data-tk-theme="dark"] .badge-okay,
html[data-tk-theme="dark"] .pin-status,
html[data-tk-theme="dark"] .pin-status.is-warn{color:#F2C75C;border-color:#6B5417}
html[data-tk-theme="dark"] .badge-dirty,
html[data-tk-theme="dark"] .pin-status.is-error{color:#FF9C85;border-color:#6E2E22}
html[data-tk-theme="dark"] .pin-status.is-ok{border-color:var(--green-300)}
html[data-tk-theme="dark"] .badge-water{color:#6FD3F2;border-color:#1E5566}
html[data-tk-theme="dark"] .community-status.is-flagged{color:#FF9C85}
html[data-tk-theme="dark"] .rv-flag{color:#F2C75C}
html[data-tk-theme="dark"] .facility-chip.evidence.is-official{border-color:#1E5566}
html[data-tk-theme="dark"] .facility-chip.evidence.is-conflict,
html[data-tk-theme="dark"] .rv-item.is-flagged{border-color:#6B5417}
html[data-tk-theme="dark"] .rv-heart.is-on{color:#FF7BA6;border-color:#6A2B40;background:#3A1826}
html[data-tk-theme="dark"] .tk-cc-btn.is-report{color:var(--coral-400)}
html[data-tk-theme="dark"] .tk-premium-message{color:var(--text-strong)}
/* empty stars read as outlines on the dark card */
html[data-tk-theme="dark"] .review-stars button:not(.is-on),
html[data-tk-theme="dark"] .clean-stars button:not(.is-on){color:#6A7C70}
/* small print in the shell uses the muted ink in both themes */
.tk-meta{color:var(--text-muted)}
/* colour facility icons: dark outlines need a light backing on the dark theme */

/* ---------- check-in popup ---------- */
.tk-checkin .pin-modal-head h3{margin-top:6px}
.tk-checkin-mark{display:block;font-size:34px;line-height:1}
.tk-checkin-sub{margin:6px 0 0;font-size:14px;color:var(--text-muted)}
.tk-checkin-actions{display:grid;gap:10px;padding-bottom:18px}
.tk-checkin-btn{
  display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;margin:0;padding:0 16px;
  background:var(--surface-card);color:var(--text-strong);border:1px solid var(--line);border-radius:var(--radius-pill);
  font:inherit;font-size:16px;font-weight:var(--fw-semibold);cursor:pointer;
}
.tk-checkin-btn span:first-child{font-size:20px}
.tk-checkin-btn.is-good{background:var(--green-400);border-color:transparent;color:var(--green-900)}
.tk-checkin-btn.is-bad{color:var(--coral-600)}
html[data-tk-theme="dark"] .tk-checkin-btn.is-bad{color:var(--coral-400)}
.tk-checkin-btn:active{transform:scale(var(--press-scale))}
.tk-checkin-skip{justify-self:center}

/* ---------- rescue kit ---------- */
.tk-rescue{margin-top:28px}
.tk-rescue-sub{margin:-2px 0 12px;font-size:14px;color:var(--text-muted)}
.tk-rescue-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.tk-rescue-tabs .tag{height:40px;cursor:pointer}
.tk-rescue-tabs .tag span{font-size:17px}
.tk-rescue-empty{margin:0;padding:14px 16px;background:var(--surface-card);border:1px solid var(--line-soft);border-radius:var(--radius-lg);font-size:14px;color:var(--text-muted)}
.tk-rescue-empty .btn{margin-top:10px}
.tk-shop{display:flex;align-items:center;gap:12px;padding:12px 14px}
.tk-shop + .tk-shop{border-top:1px solid var(--line-soft)}
.tk-shop-text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}
.tk-shop-text .tk-place-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- missions ---------- */
.tk-home-missions{margin-top:24px}
.tk-missions{padding:16px;background:var(--surface-card);border:1px solid var(--line-soft);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}
.tk-profile + .tk-missions{margin-top:16px}
.tk-missions-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}
.tk-missions-head strong{font-size:16px;color:var(--text-strong)}
.tk-missions-head span{font-size:12px;color:var(--text-muted)}
.tk-missions ul{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.tk-missions li{display:grid;grid-template-columns:26px 1fr auto;align-items:center;column-gap:8px;row-gap:5px}
.tk-mission-emoji{font-size:17px;text-align:center}
.tk-mission-text{font-size:14px;color:var(--text-body)}
.tk-mission-count{font-size:13px;font-weight:var(--fw-semibold);color:var(--text-muted)}
.tk-mission-bar{grid-column:2 / 4;height:6px;background:var(--bg-sunken);border-radius:var(--radius-pill);overflow:hidden}
.tk-mission-bar span{display:block;height:100%;background:var(--green-400);border-radius:inherit}
.tk-missions li.is-done .tk-mission-emoji{color:var(--green-600);font-weight:var(--fw-bold)}
.tk-missions li.is-done .tk-mission-count{color:var(--green-700)}
.tk-missions-done{margin:0 0 10px;padding:8px 12px;background:var(--green-50);border-radius:var(--radius-md);font-size:14px;color:var(--text-strong)}
.tk-missions-note{margin:12px 0 0;font-size:12px;color:var(--text-muted)}
.tk-missions.is-compact .tk-missions-note{display:none}

/* ---------- route stops ---------- */
.tk-stops{margin-top:12px;padding:14px;background:var(--surface-card);border:1px solid var(--line-soft);border-radius:var(--radius-lg)}
.tk-stops-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.tk-stops-head strong{font-size:15px;color:var(--text-strong)}
.tk-stops-head .tk-seg-btn{min-width:0;height:30px;padding:0 10px;font-size:12px}
.tk-stops ol{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.tk-stops li{display:flex;align-items:center;gap:10px}
.tk-stop-time{flex:0 0 auto;min-width:74px;padding:4px 8px;background:var(--green-50);border-radius:var(--radius-pill);font-size:12px;font-weight:var(--fw-semibold);color:var(--green-700);text-align:center}
.tk-stop-text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}
.tk-stops-note{margin:10px 0 0;font-size:12px;color:var(--text-muted)}

/* ---------- offline list ---------- */
.tk-offline-list{margin-top:20px}
.tk-offline-list[hidden]{display:none}
.tk-compass{
  flex:0 0 auto;display:grid;place-items:center;width:34px;height:34px;
  background:var(--green-50);color:var(--green-700);border-radius:50%;
  font-size:18px;font-weight:var(--fw-bold);
}

/* ---------- phase B: status, event pins, entrance photos ---------- */
/* the app card shows "ตอนนี้เป็นยังไง" up front, so the detail panel does not repeat it */
body.tk-app .card-detail .status-now{display:none}
body.tk-app .tk-card-community .status-now{margin:0 0 12px}
.tk-event{margin-top:16px;padding-top:14px;border-top:1px solid var(--line-soft)}
.tk-event .tk-seg{flex-wrap:wrap;border-radius:var(--radius-lg)}
.tk-event .tk-seg-btn{min-width:0;padding:0 10px;font-size:13px}
html[data-tk-theme="dark"] .contrib-options button.is-on{color:var(--green-800)}
html[data-tk-theme="dark"] .status-btn{background:var(--surface-card)}
/* the map card already scrolls as a whole; no second scroller inside it */
body.tk-app .full-map-sheet .card-detail-scroll{max-height:none;overflow:visible;-webkit-mask-image:none;mask-image:none}

/* ---------- round 3 ---------- */
.tk-planb,.tk-fill{margin-top:28px}
.tk-planb[hidden],.tk-fill[hidden]{display:none}
.tk-planb-kind{flex:0 0 auto;width:34px;height:34px;display:grid;place-items:center;background:var(--sun-100);border-radius:50%;font-size:17px}

.tk-staff-open{
  display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:12px 0 0;min-height:44px;padding:0 14px;
  background:var(--surface-card);color:var(--text-strong);border:1px dashed var(--line-strong);border-radius:var(--radius-pill);
  font:inherit;font-size:14px;font-weight:var(--fw-semibold);cursor:pointer;
}
/* การ์ดขอใช้ห้องน้ำ (redesign 11-15): a soft green card with no outline, the sentence big and
   broken only at its spaces, and the nine phrases as a 3 × 3 grid of picture tiles. The card
   keeps light colours in dark mode too: it is held up for someone else to read. */
.tk-staff .pin-modal-sheet{padding:20px 18px 18px;max-width:440px}
.tk-staff-close{position:absolute;top:14px;right:14px}
.tk-staff-hint{display:table;margin:8px auto 14px;padding:6px 14px;border-radius:999px;background:var(--tk-fill,#EFF2ED);
  font-size:13px;font-weight:600;color:var(--text-muted)}
.tk-staff-card{padding:26px 18px 24px;text-align:center;background:#EEF8E8;border-radius:28px}
.tk-staff-mark{display:grid;place-items:center;width:84px;height:84px;margin:0 auto;border-radius:50%;background:#FFFFFF}
.tk-staff-mark .tk-emo{width:58px;height:58px;vertical-align:0}
.tk-staff-th{margin:16px 0 10px;font-size:32px;line-height:1.3;font-weight:var(--fw-bold);color:#14261A;text-wrap:balance}
.tk-staff-th>span{display:inline-block;max-width:100%}
.tk-staff-th.is-long{font-size:26px}
.tk-staff-en{margin:0;font-size:15px;line-height:1.5;color:#4B5A50}
.tk-staff-en+.tk-staff-en{margin-top:4px}
.tk-staff-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.tk-staff-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:78px;padding:10px 4px 9px;
  border:0;border-radius:18px;background:var(--tk-fill,#EFF2ED);color:var(--text-body);font:inherit;font-size:12.5px;font-weight:600;
  line-height:1.25;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}
.tk-staff-tile:active{transform:scale(.96)}
.tk-staff-tile-ic .tk-emo{width:30px;height:30px;vertical-align:0}
.tk-staff-tile.is-on{background:var(--green-100,#DDF5CF);color:var(--green-900,#14361D);font-weight:700}
@media (hover:hover){.tk-staff-tile:not(.is-on):hover{background:var(--tk-fill-hover,#E6EBE3)}}
html[data-tk-theme="dark"] .tk-staff-tile.is-on{background:rgba(126,217,87,.22);color:#DDF5CF}

.tk-setting-discreet + .tk-setting-hint{margin-top:-2px}

.tk-cc-btn.is-icon{flex:0 0 auto;width:44px;padding:0}

body.tk-app[data-tk-tab="hall"] main > #tkHallExtras{display:block;order:1;padding-top:0}
.tk-hall-extras .container{display:grid;gap:14px}
.tk-hall-card{padding:16px;background:var(--surface-card);border:1px solid var(--line-soft);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}
.tk-hall-card h3{margin:0 0 10px;font-size:17px}
.tk-hall-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.tk-hall-place{display:flex;flex-direction:column;align-items:flex-start;width:100%;padding:8px 10px;margin:0;background:var(--bg-page);border:0;border-radius:var(--radius-md);font:inherit;text-align:left;cursor:pointer}
.tk-hall-list li{display:flex;align-items:center;gap:10px}
.tk-district{flex:0 0 96px;font-size:14px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-district-bar{flex:1 1 auto;height:8px;background:var(--bg-sunken);border-radius:var(--radius-pill);overflow:hidden}
.tk-district-bar span{display:block;height:100%;background:var(--green-400);border-radius:inherit}
.tk-district-n{flex:0 0 auto;min-width:22px;text-align:right;font-size:13px;color:var(--text-muted)}

.tk-onboard .pin-modal-sheet{max-width:400px}
.tk-onboard-body{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 22px 22px;text-align:center}
.tk-onboard-art{width:112px;height:112px;object-fit:contain}
.tk-used-body .tk-used-name{margin:0;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-used-body .btn{width:100%;margin-top:6px}
.tk-onboard-body h3{margin:6px 0 0;font-size:22px;line-height:1.3}
.tk-onboard-body p{margin:0;font-size:15px;line-height:1.6;color:var(--text-body)}
.tk-onboard-dots{display:flex;gap:6px;margin:8px 0 6px}
.tk-onboard-dots span{width:7px;height:7px;border-radius:50%;background:var(--line-strong)}
.tk-onboard-dots span.is-on{width:20px;border-radius:4px;background:var(--green-500)}
.tk-onboard-body .btn{width:100%}

/* English headline lines are longer: a little smaller, and each line stays whole */
.tk-home-title{white-space:nowrap}
html[data-tk-lang="en"] .tk-home-title{font-size:26px}

/* ---------- home card: words on top, the walking-to-the-toilet picture below ---------- */
.tk-home-hero{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;min-height:0;padding:22px 22px 0}
.tk-home-hero .tk-hero-dots{width:46%;bottom:auto;height:130px}
.tk-home-copy{padding-bottom:0}
.tk-home-title{white-space:normal}
.tk-home-title span{white-space:nowrap}
html[data-tk-lang="en"] .tk-home-title{font-size:28px}
.tk-home-art{
  display:block;width:calc(100% + 44px);max-width:none;height:176px;margin:14px -22px 0;
  object-fit:cover;object-position:52% 70%;
}
html[data-tk-theme="dark"] .tk-home-art{filter:brightness(.88)}
/* Thai marks above and below the line need room: ุ in ปุ๊บ must not touch ้ in ห้อง */
.tk-home-title{line-height:1.42;padding-top:2px}
html[data-tk-lang="en"] .tk-home-title{line-height:1.2}

/* centred headline: bigger words, dots around them instead of one empty corner */
.tk-home-copy{text-align:center}
.tk-home-title{font-size:38px;line-height:1.36;letter-spacing:-.02em}
html[data-tk-lang="en"] .tk-home-title{font-size:30px;line-height:1.2}
.tk-home-hero .tk-hero-dots{
  left:0;right:0;width:auto;height:190px;
  -webkit-mask-image:radial-gradient(ellipse 58% 62% at 50% 52%,transparent 55%,#000 88%);
          mask-image:radial-gradient(ellipse 58% 62% at 50% 52%,transparent 55%,#000 88%);
}
.tk-home-chip{margin-top:12px}

/* floating buttons live only on the map now: pages end just above the tab bar */
.tk-screen{padding-bottom:calc(var(--tk-bottom) + 16px)}
body.tk-app main{padding-bottom:calc(var(--tk-bottom) + 16px)}

/* The website's donate buttons are hidden inside the app, because Apple's rules say
   payments in an app go through Apple. On the web that rule does not exist — and a
   project kept alive by people chipping in for the server bill should say so — so this
   applies only where there is no web host marking the page. */
html:not(.tk-host-web) body.tk-app [data-open-donate],
html:not(.tk-host-web) body.tk-app .qr-button,
html:not(.tk-host-web) body.tk-app .donate-modal{display:none!important}
/* the support and privacy pages live on the website only; the app has its own menu rows */
html:not(.tk-host-web) body.tk-app [data-web-only]{display:none!important}

/* ---------- terms and privacy ---------- */
.tk-legal .pin-modal-sheet{max-width:520px}
.tk-legal-body{max-height:70vh;overflow-y:auto}
.tk-legal-body h4{margin:16px 0 6px;font-size:15px;color:var(--text-strong)}
.tk-legal-body h4:first-child{margin-top:0}
.tk-legal-body ul{margin:0;padding-left:18px;display:grid;gap:6px}
.tk-legal-body li,.tk-legal-body p{font-size:14px;line-height:1.6;color:var(--text-body)}
.tk-legal-body hr{margin:18px 0;border:0;border-top:1px solid var(--line-soft)}
.rv-act[data-tk-block]{color:var(--text-muted)}

/* ---------- touch targets: Apple asks for 44pt; nothing tappable stays under 40 ---------- */
body.tk-app .pin-modal-close,
body.tk-app .full-map-sheet-close{width:44px;height:44px}
body.tk-app .full-map-sheet-close svg{width:18px;height:18px}
body.tk-app .full-map-filters .tag,
body.tk-app .tk-staff-tabs .tag,
body.tk-app .tk-rescue-tabs .tag{height:40px}
body.tk-app .tk-seg-btn{height:40px}
body.tk-app .status-toggle,
body.tk-app .status-btn{min-height:40px}
body.tk-app .contrib-choice button,
body.tk-app .contrib-options button{min-height:40px}
body.tk-app .tk-map-grow,
body.tk-app .pin-map-wrap .pin-locate{height:40px}
body.tk-app .tk-home-chip{min-height:40px;padding:10px 14px}
/* Premium chip in the iPhone app (renderPremiumChip): gold instead of the green note.
   Uses the brand's own sun colours; only the chip changes, nothing else on the page. */
.tk-home-chip.tk-gold{
  position:relative;overflow:hidden;gap:7px;
  background:linear-gradient(135deg,#FFF8E1 0%,var(--sun-100) 45%,#FFE08A 100%);
  color:#5C4200;border:1px solid rgba(217,154,0,.45);
  box-shadow:none;
  font-size:12px;
}
.tk-home-chip.tk-gold b{font-weight:var(--fw-bold);letter-spacing:.03em;color:#3F2D00}
.tk-home-chip.tk-gold > span{font-weight:var(--fw-medium)}
.tk-home-chip.tk-gold .tk-crown{width:17px;height:17px;flex:0 0 auto;color:var(--sun-600);filter:drop-shadow(0 1px 0 rgba(255,255,255,.7))}
.tk-premium-badge .tk-crown{width:15px;height:15px;color:var(--sun-600)}
.tk-gold-price{
  margin-left:2px;padding:2px 9px;border-radius:var(--radius-pill);
  background:#3F2D00;color:#FFE08A;font-weight:var(--fw-bold);font-size:11px;
}
/* a slow shine across the chip, every few seconds */
.tk-home-chip.tk-gold::after{
  content:'';position:absolute;top:0;bottom:0;left:-60%;width:40%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.75),transparent);
  transform:skewX(-20deg);animation:tk-gold-shine 4.5s ease-in-out 1.2s infinite;pointer-events:none;
}
@keyframes tk-gold-shine{0%{left:-60%}28%,100%{left:130%}}
.tk-home-chip.tk-gold.is-owned::after{animation-duration:9s}
@media (prefers-reduced-motion:reduce){.tk-home-chip.tk-gold::after{animation:none;display:none}}
html[data-tk-theme="dark"] .tk-home-chip.tk-gold{
  background:linear-gradient(135deg,#3A2C08 0%,#4A3810 55%,#6B4F12 100%);
  color:#F5E3A8;border-color:rgba(255,197,61,.45);box-shadow:none;
}
html[data-tk-theme="dark"] .tk-home-chip.tk-gold b{color:#FFE08A}
html[data-tk-theme="dark"] .tk-gold-price{background:#FFE08A;color:#3F2D00}

/* ---------- Premium owned (iPhone app): the hero card becomes the Premium cover ----------
   The page itself stays the normal colour — Premium shows in one place, clearly, instead of
   tinting every screen. The cover art (scene-hero-premium.jpg, set from app-shell.js) keeps
   its top third white on purpose: the live text sits there, so it still switches language. */
/* (11-16) Premium no longer turns the hero into a tall cover: its picture is swapped for the crowned one */
.tk-wordmark-premium{display:inline-flex;align-items:center;gap:4px;color:var(--green-700)}
.tk-wordmark-premium .tk-crown{width:17px;height:17px;color:var(--sun-600);transform:translateY(-1px)}
.tk-premium-line{
  display:inline-flex;align-items:center;gap:6px;margin:12px 0 0;padding:4px 12px;
  border:1px solid rgba(217,154,0,.55);border-radius:var(--radius-pill);
  background:rgba(255,255,255,.8);
  font-size:13px;font-weight:var(--fw-semibold);color:#6B4D00;
}
body.tk-app.tk-premium .tk-home-hero .tk-home-wordmark{color:var(--green-600)}
/* Premium: the closing "ไม่ต้องรู้ว่าคุณเป็นใคร" card gets its own cover (scene-cta-premium.jpg,
   art in the top half fading to white). The words and both buttons sit in the white half. */
/* (11-16) the closing card keeps its normal layout under Premium; only its picture changes */
/* The two buttons on the location card are the small size the website uses inside cards,
   which is 36px — fine under a mouse, under the mark on a phone, and these two are how
   someone turns location on in the first place. */
body.tk-app .tk-where-actions .btn{min-height:40px}
body.tk-app .rv-act{min-height:40px}
body.tk-app .tk-stops-head .tk-seg-btn{height:36px}
/* three buttons on one row: the two word buttons keep their words on one line */
.tk-cc-btn{font-size:13px;white-space:nowrap;padding:0 8px;min-width:0}
.tk-cc-btn span{overflow:hidden;text-overflow:ellipsis}
.tk-cc-actions{gap:6px}
html[data-tk-lang="en"] .tk-cc-btn{font-size:12px}
/* "หมุดไม่ตรง" / "แก้ไขหมุด" are longer than "รีวิว": their button takes the larger share, so a 360px phone shows the whole word */
.tk-cc-btn.is-report,.tk-cc-btn.is-edit{flex-grow:1.5}
html[data-tk-lang="en"] .tk-cc-btn svg{width:15px;height:15px}
body.tk-app .toilet-card .distance{white-space:nowrap}

/* rows that live inside a list are cards now: shops, offline results, plan B */
.tk-shop{
  background:var(--surface-card);border-radius:20px;padding:12px 14px;
  box-shadow:none;
}
.tk-shop + .tk-shop{border-top:0}
/* the display settings stay one grouped card */
.tk-list.tk-settings{
  display:block;background:var(--surface-card);border-radius:22px;
  box-shadow:none;
}
html[data-tk-theme="dark"] .tk-row,
html[data-tk-theme="dark"] .tk-place,
html[data-tk-theme="dark"] .tk-shop,
html[data-tk-theme="dark"] .tk-list.tk-settings{box-shadow:none}

/* ================================================================
   Soft surfaces, everywhere
   One look for every panel in the app: white, generously rounded, lifted by a
   soft shadow instead of a hairline. Controls that need an edge to be read as
   controls (inputs, chips, outline buttons) keep a faint line.
   ================================================================ */
body.tk-app .card,
body.tk-app .card-sm,
body.tk-app .toilet-card,
body.tk-app .stat-block,
body.tk-app .step-card,
body.tk-app .scene,
body.tk-app .rv-item,
body.tk-app .map-demo-panel,
body.tk-app .pin-modal-sheet,
body.tk-app .full-map-sheet,
body.tk-app .tk-home-hero,
body.tk-app .tk-quick-card,
body.tk-app .tk-rec,
body.tk-app .tk-where,
body.tk-app .tk-missions,
body.tk-app .tk-hall-card,
body.tk-app .tk-stops,
body.tk-app .tk-rescue-empty,
body.tk-app .tk-state,
body.tk-app .tk-trip,
body.tk-app .tk-crv,
body.tk-app .status-now,
body.tk-app .tk-card-community{
  border:0;
  box-shadow:none;
}
body.tk-app .tk-card-community,
body.tk-app .status-now,
body.tk-app .tk-crv{box-shadow:none}

/* rounder corners so nothing reads as a sharp box */
body.tk-app .card,
body.tk-app .card-sm,
body.tk-app .toilet-card,
body.tk-app .stat-block,
body.tk-app .step-card,
body.tk-app .tk-quick-card,
body.tk-app .tk-rec,
body.tk-app .tk-where,
body.tk-app .tk-missions,
body.tk-app .tk-hall-card,
body.tk-app .tk-stops,
body.tk-app .tk-rescue-empty,
body.tk-app .tk-state,
body.tk-app .rv-item{border-radius:20px}
body.tk-app .tk-home-hero,
body.tk-app .full-map-sheet,
body.tk-app .pin-modal-sheet{border-radius:26px}
body.tk-app .scene,
body.tk-app .scene .frame{border-radius:22px}
/* "คนหนึ่งปัก อีกคนรอด" and the points picture: the art goes edge to edge, no white mat around it */
body.tk-app figure.scene:has(img[src*="scene-community"]),
body.tk-app figure.scene:has(img[src*="scene-points"]),
body.tk-app figure.scene:has(img[src*="scene-how"]){padding:0;border:0;background:transparent}
/* on a phone the 16:6 frame hit its 180px minimum and cropped the sides of the picture
   (the big pin on the right was cut off): follow the picture's own shape instead */
body.tk-app figure.scene:has(img[src*="scene-community"]) .frame,
body.tk-app figure.scene:has(img[src*="scene-how"]) .frame{min-height:0;aspect-ratio:1600/600}
body.tk-app .tk-crv,
body.tk-app .status-now{border-radius:16px}

/* panels that float above the map keep a little more lift */
body.tk-app .full-map-sheet,
body.tk-app .pin-modal-sheet{box-shadow:0 8px 18px -10px rgba(20,38,26,.20),0 30px 60px -28px rgba(20,38,26,.34)}

/* in the dark the shadow does the same job with more depth */
html[data-tk-theme="dark"] body.tk-app .card,
html[data-tk-theme="dark"] body.tk-app .card-sm,
html[data-tk-theme="dark"] body.tk-app .toilet-card,
html[data-tk-theme="dark"] body.tk-app .stat-block,
html[data-tk-theme="dark"] body.tk-app .step-card,
html[data-tk-theme="dark"] body.tk-app .scene,
html[data-tk-theme="dark"] body.tk-app .rv-item,
html[data-tk-theme="dark"] body.tk-app .tk-home-hero,
html[data-tk-theme="dark"] body.tk-app .tk-quick-card,
html[data-tk-theme="dark"] body.tk-app .tk-rec,
html[data-tk-theme="dark"] body.tk-app .tk-where,
html[data-tk-theme="dark"] body.tk-app .tk-missions,
html[data-tk-theme="dark"] body.tk-app .tk-hall-card,
html[data-tk-theme="dark"] body.tk-app .tk-stops,
html[data-tk-theme="dark"] body.tk-app .tk-rescue-empty,
html[data-tk-theme="dark"] body.tk-app .tk-state{box-shadow:none}
html[data-tk-theme="dark"] body.tk-app .full-map-sheet,
html[data-tk-theme="dark"] body.tk-app .pin-modal-sheet{box-shadow:0 8px 18px -10px rgba(0,0,0,.5),0 30px 60px -28px rgba(0,0,0,.75)}

/* controls keep a quiet edge: they must still read as tappable */
body.tk-app .tag,
body.tk-app .facility-chip,
body.tk-app .status-btn,
body.tk-app .status-toggle,
body.tk-app .search-field,
body.tk-app .full-map-search{border-color:var(--line-soft)}
/* the three buttons on the map card follow the 40px minimum too */
body.tk-app .tk-cc-btn{min-height:40px}

/* ---------- เล่นระหว่างรอ: the little games ---------- */
.tk-games{
  position:fixed;inset:0;z-index:2150;display:flex;flex-direction:column;
  background:var(--bg-page);
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.tk-games[hidden]{display:none}
body.tk-games-open{overflow:hidden}
.tk-games-bar{
  display:flex;align-items:center;gap:12px;padding:10px 16px 8px;
  background:var(--tk-bar);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line-soft);
}
.tk-games-close{
  display:grid;place-items:center;width:44px;height:44px;flex:0 0 auto;margin:0;padding:0;
  background:var(--surface-card);color:var(--text-strong);border:0;border-radius:50%;
  box-shadow:var(--shadow-sm);cursor:pointer;
}
.tk-games-close svg{width:20px;height:20px}
.tk-games-title{display:flex;flex-direction:column;min-width:0}
.tk-games-title strong{font-size:18px;color:var(--text-strong)}
.tk-games-title span{font-size:12px;color:var(--text-muted)}
.tk-games-stage{flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:16px var(--gutter) 24px}
.tk-games-note{margin:16px 2px 0;font-size:12px;line-height:1.6;color:var(--text-muted)}

.tk-game-list{display:grid;gap:10px}
.tk-game-card{
  display:flex;align-items:center;gap:14px;width:100%;min-height:82px;margin:0;padding:14px 16px;
  background:var(--surface-card);border:0;border-radius:20px;
  box-shadow:none;
  font:inherit;text-align:left;cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop);
}
.tk-game-card:active{transform:scale(.985)}
.tk-game-emoji{
  flex:0 0 auto;display:grid;place-items:center;width:48px;height:48px;font-size:26px;
  background:var(--green-50);border-radius:14px;
}
.tk-game-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}
.tk-game-text strong{font-size:17px;color:var(--text-strong)}
.tk-game-text span{font-size:13px;color:var(--text-muted)}
.tk-game-best{font-size:12px;color:var(--green-700);font-weight:var(--fw-semibold)}

.tk-game-canvas{border-radius:22px;overflow:hidden;box-shadow:var(--shadow-card);background:var(--surface-card)}
.tk-game-canvas canvas{display:block;width:100%;touch-action:none}
.tk-game-hint{margin:12px 2px 0;font-size:13px;color:var(--text-muted);text-align:center}

.tk-game-over{
  display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 20px 22px;text-align:center;
  background:var(--surface-card);border-radius:24px;box-shadow:var(--shadow-card);
}
.tk-game-over strong{font-size:34px;color:var(--text-strong)}
.tk-game-over > span{font-size:15px;color:var(--text-body)}
.tk-game-over .btn{width:100%;margin-top:8px}

.tk-quiz{display:flex;flex-direction:column;gap:10px}
.tk-quiz-bar{height:8px;background:var(--bg-sunken);border-radius:var(--radius-pill);overflow:hidden}
.tk-quiz-bar span{display:block;height:100%;background:var(--green-400);border-radius:inherit;transition:width .1s linear}
.tk-quiz-q{margin:6px 0 4px;font-size:19px;line-height:1.5;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-quiz-a{
  width:100%;min-height:56px;margin:0;padding:14px 16px;
  background:var(--surface-card);color:var(--text-strong);border:0;border-radius:18px;
  box-shadow:none;
  font:inherit;font-size:16px;text-align:left;cursor:pointer;
}
.tk-quiz-a.is-right{background:var(--green-100);color:var(--green-900)}
.tk-quiz-a.is-wrong{background:var(--coral-100);color:var(--coral-600)}
html[data-tk-theme="dark"] .tk-quiz-a.is-right{color:var(--green-800)}
html[data-tk-theme="dark"] .tk-quiz-a.is-wrong{color:var(--coral-400)}
.tk-quiz-score{margin:6px 0 0;text-align:center;font-size:14px;color:var(--text-muted)}

/* ---------- games: how to play, HUD, leaderboard, home card ---------- */
.tk-howto{
  display:flex;flex-direction:column;align-items:center;gap:10px;padding:26px 20px 20px;text-align:center;
  background:var(--surface-card);border-radius:24px;box-shadow:var(--shadow-card);
}
.tk-game-emoji.is-big{width:72px;height:72px;font-size:40px;border-radius:22px}
.tk-howto-blurb{margin:0;font-size:15px;color:var(--text-body)}
.tk-howto-list{list-style:none;margin:6px 0 2px;padding:0;display:grid;gap:10px;width:100%;text-align:left}
.tk-howto-list li{display:flex;align-items:flex-start;gap:10px;font-size:15px;line-height:1.55;color:var(--text-body)}
.tk-howto-list li span{
  flex:0 0 auto;display:grid;place-items:center;width:26px;height:26px;
  background:var(--green-100);color:var(--green-900);border-radius:50%;
  font-size:13px;font-weight:var(--fw-bold);
}
.tk-howto .btn{width:100%;margin-top:6px}

.tk-game-hud{display:flex;gap:8px;margin-bottom:12px}
.tk-game-stat{
  flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 6px;
  background:var(--surface-card);border-radius:16px;box-shadow:var(--shadow-sm);
}
.tk-game-stat small{font-size:11px;color:var(--text-muted)}
.tk-game-stat strong{font-size:20px;color:var(--text-strong);font-variant-numeric:tabular-nums;white-space:nowrap}
.tk-game-stat.is-best strong{color:var(--green-700)}
.tk-game-stat strong.is-bump{animation:tk-bump .28s var(--ease-pop)}
@keyframes tk-bump{0%{transform:scale(1)}40%{transform:scale(1.25)}100%{transform:scale(1)}}

.tk-game-canvas{position:relative}
.tk-game-ready{
  position:absolute;inset:0;display:grid;place-items:center;
  background:rgba(244,246,243,.86);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  cursor:pointer;animation:tk-fade var(--dur-base) var(--ease-standard);
}
html[data-tk-theme="dark"] .tk-game-ready{background:rgba(10,18,13,.86)}
.tk-game-ready-inner{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:0 24px}
.tk-game-ready-inner strong{font-size:24px;color:var(--text-strong);animation:tk-breathe 1.8s ease-in-out infinite}
.tk-game-ready-inner span{font-size:14px;color:var(--text-muted)}
@keyframes tk-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}

.tk-leaderboard{margin-bottom:14px;padding:14px 16px;background:var(--surface-card);border-radius:20px;box-shadow:var(--shadow-sm)}
.tk-lb-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.tk-lb-head strong{font-size:15px;color:var(--text-strong)}
.tk-lb-head span{font-size:13px;color:var(--text-muted)}
.tk-leaderboard ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.tk-leaderboard li{display:flex;align-items:center;gap:8px;font-size:14px}
.tk-lb-game{flex:1 1 auto;min-width:0;color:var(--text-body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-lb-who{flex:0 0 auto;color:var(--text-strong);font-weight:var(--fw-semibold)}
.tk-lb-who.is-empty{color:var(--text-muted);font-weight:var(--fw-regular);font-size:13px}
.tk-lb-score{flex:0 0 auto;min-width:36px;text-align:right;font-weight:var(--fw-bold);color:var(--green-700);font-variant-numeric:tabular-nums}
.tk-lb-note{margin:10px 0 0;font-size:12px;color:var(--text-muted)}

.tk-games-home{margin-top:24px}
.tk-games-sub{margin:-2px 0 12px;font-size:14px;color:var(--text-muted)}
.tk-game-chips{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:2px 12px 6px}
.tk-game-chips::-webkit-scrollbar{display:none}
.tk-game-chip{
  flex:0 0 auto;display:flex;align-items:center;gap:10px;min-height:64px;padding:10px 14px;margin:0;
  background:var(--surface-card);border:0;border-radius:18px;box-shadow:var(--shadow-sm);
  font:inherit;text-align:left;cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop);
}
.tk-game-chip:active{transform:scale(.97)}
.tk-game-chip > span[aria-hidden]{font-size:24px}
.tk-game-chip-text{display:flex;flex-direction:column}
.tk-game-chip-text strong{font-size:15px;color:var(--text-strong)}
.tk-game-chip-text small{font-size:12px;color:var(--text-muted)}

/* ---------- arcade games (app/arcade*.js): the canvas fills the stage ---------- */
.tk-games-stage.is-arcade{padding:0;overflow:hidden}
.tk-arcade{flex:1 1 auto;display:grid;place-items:center;min-height:0;overflow:hidden;background:#EAF4E4}
html[data-tk-theme="dark"] .tk-arcade{background:#16241B}
.tk-arcade canvas{display:block;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.tk-arcade.is-loading{min-height:60vh}
.tk-arcade.is-loading span{font-size:15px;color:var(--text-muted);animation:tk-breathe 1.4s ease-in-out infinite}
/* game pictures sit on their own, no tile behind them */
.tk-game-emoji:has(img){background:none}
.tk-game-emoji img{width:48px;height:48px;object-fit:contain}
.tk-game-emoji img.is-big{width:84px;height:84px}
.tk-game-emoji.is-big:has(img){width:auto;height:auto}
.tk-game-chip-icon{display:grid;place-items:center;font-size:24px}
.tk-game-chip-icon img{width:38px;height:38px;object-fit:contain}
.tk-lb-game img{width:20px;height:20px;object-fit:contain;vertical-align:-4px}
.tk-lb-gap{height:16px}
.tk-game-over .btn-secondary{margin-top:0;background:var(--green-50);border-color:transparent;box-shadow:none;color:var(--green-900)}
html[data-tk-theme="dark"] .tk-game-over .btn-secondary{background:rgba(126,217,87,.14);color:var(--green-200)}

/* ---------- movement: small, quick, never in the way ---------- */
.tk-pop{animation:tk-pop-in var(--dur-slow) var(--ease-pop)}
@keyframes tk-pop-in{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}
body.tk-app .btn:active,
body.tk-app .tk-quick-card:active,
body.tk-app .tk-rec:active{transform:scale(.97)}
body.tk-app .btn,
body.tk-app .tk-quick-card,
body.tk-app .tk-rec{transition:transform var(--dur-fast) var(--ease-pop)}
.tk-tab.is-active .tk-tab-icon{animation:tk-tab-hop var(--dur-slow) var(--ease-pop)}
@keyframes tk-tab-hop{0%{transform:translateY(0) scale(1)}45%{transform:translateY(-4px) scale(1.08)}100%{transform:none}}
/* screens arrive with a gentle rise, one after another */
body.tk-app .tk-screen.tk-enter > *{animation:tk-rise var(--dur-slow) var(--ease-out-soft) backwards}
body.tk-app .tk-screen.tk-enter > *:nth-child(1){animation-delay:.02s}
body.tk-app .tk-screen.tk-enter > *:nth-child(2){animation-delay:.06s}
body.tk-app .tk-screen.tk-enter > *:nth-child(3){animation-delay:.10s}
body.tk-app .tk-screen.tk-enter > *:nth-child(4){animation-delay:.14s}
body.tk-app .tk-screen.tk-enter > *:nth-child(n+5){animation-delay:.18s}
@keyframes tk-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
/* the map card slides up from the bottom instead of appearing */
/* --sheet-x is where the card sits sideways: centred on a phone, 0 in the desktop corner.
   The rise was written for the centred card only, so on a desktop it started half a card
   to the left and snapped back at the end: the "left first, then bounce right" */
body.tk-app .full-map-sheet{--sheet-x:-50%}
/* from a tablet up the card sits in the left corner (styles.css) and the buttons on the
   right: nothing to step aside from, so they stay put instead of fading out as on a phone */
@media (min-width:721px){
  body.tk-app .full-map-sheet{--sheet-x:0px}
  body.tk-app.tk-sheet-open[data-tk-tab="map"] .tk-fabs{opacity:1}
  body.tk-app.tk-sheet-open[data-tk-tab="map"] .tk-fabs .tk-fab{pointer-events:auto}
  body.tk-app[data-tk-tab="map"] .tk-fabs{bottom:calc(var(--tk-bottom) + 16px)}
}
body.tk-app .full-map-sheet:not([hidden]){animation:tk-sheet-rise var(--dur-slow) var(--ease-out-soft)}
@keyframes tk-sheet-rise{from{opacity:0;transform:translate(var(--sheet-x),16px)}to{opacity:1;transform:translateX(var(--sheet-x))}}
@media (prefers-reduced-motion:reduce){
  body.tk-app *,body.tk-app *::before,body.tk-app *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

.tk-quiz{display:flex;flex-direction:column;flex:1 1 auto}
.tk-quiz-a:last-of-type{margin-bottom:0}
.tk-quiz-dots{display:flex;justify-content:center;gap:6px;margin-top:auto;padding-top:18px}
.tk-quiz-dot{width:8px;height:8px;border-radius:50%;background:rgba(17,32,23,.14);transition:background var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-pop)}
html[data-tk-theme="dark"] .tk-quiz-dot{background:rgba(255,255,255,.2)}
.tk-quiz-dot.is-now{background:var(--green-500);transform:scale(1.35)}
.tk-quiz-dot.is-right{background:var(--green-600)}
.tk-quiz-dot.is-wrong{background:var(--text-muted)}
.tk-quiz-score{margin-top:10px;text-align:center;font-size:13px;color:var(--text-muted)}

/* light mode: the neutral greys sat just under AA on the soft background.
   Only the neutrals move — brand green is untouched. */
html:not([data-tk-theme="dark"]) body.tk-app{
  --text-muted:#5F6E64;
  /* Link text in the brand green sat at 3.19:1 on white — under the 4.5 that small text
     needs. One shade down reads at 5.08 and is still unmistakably THEEKHEE green. Only
     the text moves: buttons, pins, chips and the logo keep the brand colour exactly. */
  --text-link:#3A7D21;
  --text-link-hover:#2F6A1A;
}
html:not([data-tk-theme="dark"]) body.tk-app .tk-chevron{ color:#647269; }

/* web: the two places that hand a search to Google Maps instead of answering it */
.tk-planb-handoff{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.tk-rescue-empty .btn{margin-top:8px;text-decoration:none}

/* ============================================================================
   Desktop: the same app, sitting in a window instead of a hand.

   Nothing below changes what anything does — it is the same markup the phone
   draws. A wide screen simply has room for the choices to stand still: the tabs
   move from the bottom edge to a column on the left, where a pointer expects
   them, and the lists that stack one-per-row on a phone breathe out into two.

   This never applies on iOS: the app runs at phone width, and even on an iPad
   the shell stays in its single column. The gate is the screen, not the host.
   ============================================================================ */
/* The web's boot.js adds a wordmark and a way back to the site for the desktop bar.
   A phone's bar has room for five tabs and nothing else, and both would otherwise sit
   in the grid as a sixth and seventh — so they stay hidden until there is space.
   (In the iOS app these elements never exist at all.) */
.tk-nav-brand,.tk-nav-donate,.tk-nav-pricing{display:none}
/* on a phone this wrapper must not exist as far as layout is concerned */
.tk-home-side{display:contents}

/* the story bands run edge to edge, outside the screen's own padding, the way the
   site's sections always did */
body.tk-app .tk-story-holder{margin:32px calc(var(--gutter) * -1) 0}
body.tk-app .tk-home-story{padding-block:44px}
body.tk-app .tk-home-story .container{padding-inline:var(--gutter)}
body.tk-app .tk-story-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
body.tk-app .tk-home-story .stat-block{align-items:center;text-align:center}
/* the toilet count opens where those toilets came from */
body.tk-app .tk-home-story .stat-block.is-tap{font:inherit;color:inherit;cursor:pointer;width:100%}
body.tk-app .tk-home-story .stat-block.is-tap:active{transform:scale(.98)}
.tk-stat-more{font-size:12px;font-weight:700;color:var(--text-link)}
.tk-stat-more::after{content:" \203A"}
.tk-sources .tk-src-body{padding:0 20px 20px;overflow-y:auto}
.tk-src-list{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:14px}
.tk-src-row{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:4px 10px}
.tk-src-icon{font-size:20px;line-height:1;text-align:center}
.tk-src-label{font-size:15px;color:var(--text-body)}
.tk-src-count{font-size:17px;font-variant-numeric:tabular-nums;color:var(--text-strong)}
.tk-src-bar{grid-column:2 / 4;height:8px;border-radius:99px;background:var(--surface-sunken, rgba(20,38,26,.08));overflow:hidden}
.tk-src-bar i{display:block;height:100%;border-radius:inherit;background:var(--green-400)}
.tk-src-row.is-osm .tk-src-bar i{background:var(--sky-400, #5aa9e6)}
.tk-src-row.is-station .tk-src-bar i{background:var(--sun-400, #f5c542)}
.tk-src-note{margin:16px 0 0;font-size:14px;color:var(--text-muted)}
.tk-src-actions{display:grid;gap:10px;margin-top:16px}
.tk-src-credit{margin:14px 0 0;font-size:12px;color:var(--text-faint)}
.tk-src-credit a{color:inherit;text-decoration:underline}
/* the sections moved here from Hall of Fame keep their own spacing; they only need to
   stop being hidden along with the rest of the old page */
body.tk-app .tk-story-holder > .section{display:block}
/* "วงจรชุมชน" (the web's #how) in the same dress as the number cards above it: the four
   step cards, each a full-width tile with an empty half on a phone, become one 2×2 grid,
   and the eyebrow reads like its neighbours' (Thai, no capitals or wide tracking) */
body.tk-app #how .eyebrow{text-transform:none;letter-spacing:0}
body.tk-app #how .grid-auto{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px!important}
body.tk-app #how .step-card{gap:4px;padding:16px 14px}
body.tk-app #how .step-card .sticker{width:40px;height:40px}
body.tk-app #how .step-card .title{font-size:17px;margin-top:4px}
body.tk-app #how .step-card .body{font-size:13.5px;line-height:1.55}
@media (min-width: 900px) { body.tk-app #how .grid-auto{grid-template-columns:repeat(4,minmax(0,1fr))} }

/* "THEEKHEE ทำงานยังไง" on a phone. The computer keeps the old page's two-column bands (they
   read well that wide); on a phone those bands — skyline, capital-letter eyebrows, 26 px
   headings, a free-floating illustration — looked like the old website dropped into the app.
   Here they become what every other tab is made of: cards on the page background. */
@media (max-width: 899px) {
  body.tk-app[data-tk-tab="about"] main > #pin,
  body.tk-app[data-tk-tab="about"] main > #faq{background:transparent!important;padding-top:18px;padding-bottom:6px}
  body.tk-app[data-tk-tab="about"] main > #pin .city-layer,
  body.tk-app[data-tk-tab="about"] main > #faq .city-layer,
  body.tk-app[data-tk-tab="about"] main > #pin .eyebrow,
  body.tk-app[data-tk-tab="about"] main > #faq .eyebrow{display:none}
  body.tk-app[data-tk-tab="about"] #pin .grid-2{
    display:flex;flex-direction:column-reverse;gap:0;padding:10px;
    background:var(--surface-card);border:1px solid var(--line-soft);
    border-radius:var(--radius-card);box-shadow:var(--shadow-sm)}
  body.tk-app[data-tk-tab="about"] #pin .scene{padding:0;border:0;border-radius:calc(var(--radius-card) - 6px);box-shadow:none}
  body.tk-app[data-tk-tab="about"] #pin .scene .frame{aspect-ratio:16/10;min-height:0;border-radius:inherit}
  body.tk-app[data-tk-tab="about"] #pin .grid-2 > div{padding:16px 8px 8px}
  body.tk-app[data-tk-tab="about"] #pin .section-heading h2,
  body.tk-app[data-tk-tab="about"] #faq .section-heading h2{font-size:20px;line-height:1.4}
  body.tk-app[data-tk-tab="about"] #pin .section-heading p{margin-top:8px;font-size:15px;line-height:1.65}
  body.tk-app[data-tk-tab="about"] #pin .grid-2 > div > div[style]{gap:6px!important;margin:14px 0 16px!important}
  body.tk-app[data-tk-tab="about"] #pin [data-add-place]{width:100%;justify-content:center}
  body.tk-app[data-tk-tab="about"] #faq .grid-auto-wide{grid-template-columns:1fr;gap:10px;margin-top:12px!important}
  body.tk-app[data-tk-tab="about"] #faq .card{padding:16px;background:var(--surface-card);border:1px solid var(--line-soft);box-shadow:var(--shadow-sm)}
  body.tk-app[data-tk-tab="about"] #faq .card > div{font-size:16px!important;color:var(--text-strong)!important;margin-bottom:6px!important}
  body.tk-app[data-tk-tab="about"] #faq .card > p{font-size:14px!important;line-height:1.65!important;color:var(--text-muted)!important}
}

@media (min-width: 900px) {
  body.tk-app{
    --tk-topnav:62px;
    --tk-bottom:0px;
    padding-top:var(--tk-topnav);
    -webkit-user-select:auto;user-select:auto;   /* a desktop page is meant to be copied from */
  }

  /* tabs → one bar across the top: name on the left, tabs beside it, the way out at the
     far end. A pointer travels to the top of a window; a thumb never does, which is why
     the phone keeps them at the bottom. */
  body.tk-app .tk-tabbar{
    top:0;bottom:auto;left:0;right:0;
    display:flex;align-items:center;gap:4px;
    height:var(--tk-topnav);
    padding:0 20px;
    border-top:0;border-bottom:1px solid transparent;
    box-shadow:none;   /* flat, the hairline border is enough (owner 15 พ.ย.) */
  }
  body.tk-app .tk-tab{
    flex:0 0 auto;
    flex-direction:row;justify-content:center;gap:9px;
    height:42px;padding:0 14px;border-radius:12px;
    font-size:15px;
    transition:background var(--dur-fast) var(--ease-standard);
  }
  @media (hover:hover){body.tk-app .tk-tab:hover{background:rgba(20,38,26,.05)}}
  body.tk-app .tk-tab-icon{width:26px;height:26px;border-radius:9px}
  body.tk-app .tk-tab-label{font-size:15px}
  body.tk-app .tk-tab.is-active{color:var(--green-700)}

  /* the app's own name at the left end of the bar, where a site puts its logo */
  body.tk-app .tk-nav-brand{
    display:flex;align-items:center;gap:10px;
    /* it is a link people click to get home: give it a real target, not just its text */
    min-height:40px;
    margin-right:18px;padding-right:18px;
    border-right:1px solid var(--line-soft);
    font-weight:var(--fw-bold);font-size:18px;color:var(--text-strong);
    text-decoration:none;white-space:nowrap;
  }
  body.tk-app .tk-nav-brand img{width:28px;height:28px}

  /* content: a column wide enough for two cards, centred, never edge to edge */
  body.tk-app .tk-screen{
    max-width:1080px;margin:0 auto;
    padding:28px 40px 64px;
  }
  /* The offline notice is pinned to the top of the window, which on a phone is the top
     of the app. Here the top of the window is the menu bar, and the notice was sitting
     on it. It goes under the bar instead, and the page drops by its height so nothing
     it covers was something you needed to read. */
  body.tk-app .tk-offline{top:calc(var(--tk-topnav) + 8px)}
  body.tk-app.tk-is-offline{padding-top:calc(var(--tk-topnav) + var(--tk-offline-h))}
  body.tk-app.tk-is-offline .tk-appbar{top:calc(var(--tk-topnav) + var(--tk-offline-h))}
  body.tk-app.tk-is-offline .full-map,
  body.tk-app.tk-is-offline .tk-games{top:calc(var(--tk-topnav) + var(--tk-offline-h))}

  body.tk-app .tk-appbar{
    top:var(--tk-topnav);
    min-height:64px;padding:16px 40px 14px;
    max-width:none;
  }
  /* centred, the same as on the phone: it is the name of the screen you are on, and it
     reads as a heading in the middle of the window rather than a label stuck to a corner */
  body.tk-app .tk-appbar h1{font-size:24px}
  body.tk-app .tk-back{left:32px;bottom:14px}

  /* lists have room for two across */
  body.tk-app .tk-list,
  body.tk-app .tk-nearby .tk-rec-list,
  body.tk-app .tk-game-list,
  body.tk-app .tk-rescue .tk-list{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;
  }
  /* two settings side by side: the second is on the first row, so the line that
     separates stacked rows would sit across its top edge on its own */
  body.tk-app .tk-list.tk-settings > .tk-setting:nth-child(2){border-top:0}
  body.tk-app .tk-quick{grid-template-columns:repeat(4,minmax(0,1fr))}
  body.tk-app .tk-game-chips{flex-wrap:wrap;overflow:visible;margin:0}
  body.tk-app .tk-game-chip{flex:1 1 220px}

  /* the map fills the room it is given, with the sheet beside it rather than over it */
  body.tk-app .full-map{top:var(--tk-topnav)}
  /* the sheet is positioned inside .full-map, which already begins below the bar,
     so this offset is from the map's own edges — not from the window's */
  body.tk-app .full-map-sheet{
    left:24px;right:auto;transform:none;
    width:380px;max-width:none;bottom:24px;
  }
  body.tk-app .full-map .leaflet-bottom{bottom:0}

  /* games take over the whole phone because a phone has nothing else to show. On a
     desktop they sit below the bar, leaving the navigation reachable — nobody should
     have to finish a round to get back to the map. */
  body.tk-app .tk-games{top:var(--tk-topnav)}
  body.tk-app .tk-games-stage{width:100%;max-width:620px;margin:0 auto}
  body.tk-app .tk-games-bar{padding-left:28px;padding-right:28px}
  body.tk-app .tk-game-list{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* filters swipe sideways on a phone because there is no room; here there is, and a
     row you have to drag with a mouse wheel is worse than one you can see all of */
  body.tk-app .tk-filter-row{
    flex-wrap:wrap;overflow:visible;margin:0;
    -webkit-mask-image:none;mask-image:none;
  }
  /* ...and each group wraps inside itself too: the facility chips are one flex item, and as a
     single unbroken line they ran past the right edge with nothing to scroll them back */
  body.tk-app .tk-filter-row .full-map-filters{flex:0 1 auto;flex-wrap:wrap;min-width:0;max-width:100%;row-gap:8px}
  body.tk-app .tk-filter-row .full-map-facilities{-webkit-mask-image:none;mask-image:none}

  /* The picture is cropped to a 176px band on a phone, which is art direction: the card
     is narrow, so a band is all that fits. A desktop card is three times wider, and the
     same band cuts the people in half. Here it keeps its own shape (1600x550) and is
     shown whole. */
  body.tk-app .tk-home-art{
    height:auto;aspect-ratio:1600 / 533;object-position:center;
  }

  /* ---------- the site's own chrome comes back ----------
     A phone screen is one thing at a time, so the app hides the site's footer: a wall of
     links under a tab bar is just in the way. A desktop window is not one thing at a
     time — and a page that ends where its content ends, with no credit, no licence and
     no way to help pay for the servers, reads as an app somebody forgot to finish.
     So the real footer comes back, exactly as the site writes it. */
  body.tk-app .site-footer{display:block!important}
  /* except over the map, which is full-bleed and has nothing to scroll past */
  body.tk-app[data-tk-tab="map"] .site-footer{display:none!important}
  body.tk-app .site-footer .footer-top{padding-top:56px}

  /* A short screen — search before anything is typed, an empty saved list — used to
     leave the footer floating halfway up with blank page under it. The page is a column
     that is at least as tall as the window, the screen takes the slack, and the footer
     is pushed to the bottom where a footer belongs. (Everything fixed — the top bar, the
     map, the games panel — sits outside this flow and is unaffected.) */
  body.tk-app{min-height:100vh;display:flex;flex-direction:column}
  body.tk-app > .tk-appbar{flex:0 0 auto}
  body.tk-app .tk-screen{flex:1 0 auto}
  body.tk-app > main{flex:1 0 auto}
  body.tk-app .tk-story-holder{flex:0 0 auto}
  body.tk-app .site-footer{flex:0 0 auto;margin-top:auto}

  /* ---------- the footer, in the app's own colours ----------
     The site's footer is dark green because it closes a long marketing page: a full stop
     after the story. The app is not a story, it is a room you stay in — so here the
     footer keeps the same surface as everything else and stops shouting at the bottom
     of every screen. Written in tokens, so dark mode gets a dark surface, not a white
     slab with white text on it. */
  body.tk-app .site-footer{
    background:var(--surface-card);
    color:var(--text-body);
    border-top:1px solid var(--line-soft);
  }
  body.tk-app .site-footer .wordmark.on-ink .wordmark-text{color:var(--text-strong)}
  body.tk-app .site-footer .brand-col p{color:var(--text-muted)}
  body.tk-app .site-footer .link-col h4{color:var(--green-700)}
  body.tk-app .site-footer .link-col a,
  body.tk-app .site-footer .footer-link-btn,
  body.tk-app .site-footer .heart-note p{color:var(--text-body)}
  @media (hover:hover){body.tk-app .site-footer .link-col a:hover,body.tk-app .site-footer .footer-link-btn:hover{color:var(--text-strong)}}
  body.tk-app .site-footer .footer-bottom{
    border-top-color:var(--line-soft);
    color:var(--text-muted);
  }
  /* the city silhouette was drawn to read against dark green; on this surface it goes
     pale rather than disappearing into a grey smudge */
  body.tk-app .site-footer .city-night{
    --city-far:var(--green-100);--city-mid:var(--green-200,#D9EFCB);
    --city-near:var(--green-300,#BFE4A9);--city-window:var(--surface-card);
    opacity:.55;
  }
  /* donate lives in the bar at the top and in the "ชุมชน" column; the QR block as well
     would be the third time of asking on one screen */
  body.tk-app .site-footer .link-col.qr{display:none}

  /* "ฟรี & Pro" looks like one more tab, pushed to the right with donate */
  body.tk-app .tk-nav-pricing{display:flex;align-items:center;margin-left:auto;text-decoration:none;color:inherit}
  /* until the bar has room for one more label, the crown alone says it (the name stays for screen readers) */
  @media (max-width:1099px){
    body.tk-app .tk-nav-pricing .tk-tab-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
    body.tk-app .tk-tab{padding:0 10px;gap:7px}
  }

  /* donate sits with the tabs, not hidden in a menu — it is how the servers get paid */
  body.tk-app .tk-nav-donate{
    display:inline-flex;align-items:center;gap:7px;margin-left:8px;
    height:40px;padding:0 15px;border-radius:12px;
    background:var(--green-100);border:0;
    font:inherit;font-size:14px;font-weight:var(--fw-semibold);color:var(--green-900);
    cursor:pointer;white-space:nowrap;
    transition:background var(--dur-fast) var(--ease-standard);
  }
  @media (hover:hover){body.tk-app .tk-nav-donate:hover{background:var(--green-200,#CBEDBA)}}
  /* the emergency red is too light against the pale green pill (3.63:1) — the darker
     pressed red of the same button reads properly at 4.83:1 */
  body.tk-app .tk-nav-donate span[aria-hidden]{color:var(--tk-em-red-active)}
  /* dark: the pill turns dark green, so the dark-green label vanished into it */
  html[data-tk-theme="dark"] body.tk-app .tk-nav-donate{color:var(--text-strong)}
  html[data-tk-theme="dark"] body.tk-app .tk-nav-donate span[aria-hidden]{color:var(--tk-em-red,#FF5A5F)}
  @media (hover:hover){html[data-tk-theme="dark"] body.tk-app .tk-nav-donate:hover{background:rgba(255,255,255,.08)}}

  /* ---------- home, as a tool rather than a poster ----------
     The landing page is where THEEKHEE explains itself. Someone who is already inside
     the app does not need the pitch again — they need to know where they are and where
     the nearest toilet is, without scrolling past a full-width picture to find out.

     So on a wide screen the card that carries the name sits beside the part that does
     the work, instead of on top of it. Nothing is removed: the same markup, two columns
     instead of one, and the phone keeps its single column where that is the right shape. */
  /* the tab-visibility rule above sets display on this same element and carries an
     attribute selector, so this has to match it to win */
  body.tk-app[data-tk-tab="home"] #tkHome{
    display:grid;
    grid-template-columns:minmax(0,1.02fr) minmax(330px,.98fr);
    column-gap:28px;
    /* both columns reach the same line: the group on the right is centred against the
       picture rather than hanging from the top of it */
    align-items:stretch;
  }
  body.tk-app #tkHome > *{grid-column:1 / -1}
  /* The card carries the name and the picture: across the top, whole, no crop. */
  body.tk-app #tkHome > .tk-home-hero{grid-column:1 / -1;grid-row:1;margin-bottom:0}

  /* Under it, the row that does the work: where you are across the width, then the two
     ways out of the situation side by side — run for it, or ask someone. */
  /* the visitor count: its own row between the picture and the buttons */
  body.tk-app #tkHome > .presence{grid-column:1 / -1;grid-row:2}
  body.tk-app #tkHome > .tk-home-side{
    grid-column:1 / -1;grid-row:3;
    display:grid;grid-template-columns:1fr 1fr;
    column-gap:24px;row-gap:12px;
    margin-top:26px;
  }
  body.tk-app .tk-home-side > *{margin:0;width:100%;max-width:none}
  body.tk-app .tk-home-side > .tk-home-emergency{grid-column:1;grid-row:1}
  body.tk-app .tk-home-side > .tk-home-note{grid-column:1;grid-row:2;text-align:center}
  body.tk-app .tk-home-side > .tk-walk-card{grid-column:1 / -1;grid-row:3}
  /* Sits on the button's own row, not across the button and its caption: spanning both
     put the card's middle half a line lower than the button's, which is what made the
     pair look tilted. Same row, same top, same height. */
  body.tk-app .tk-home-side > .tk-staff-open{
    grid-column:2;grid-row:1;height:64px;
  }

  /* the story bands keep the site's own section look; only the stat row needs a grid */
  body.tk-app .tk-story-stats{
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:32px;
  }

  /* The button used to be capped here, from when it sat alone across the whole page and
     a full-width red bar was too much. In the two-column layout the column is the cap,
     and a capped button beside full-width cards above and below it just looks crooked. */
  body.tk-app .tk-games-home,
  body.tk-app .tk-modes-block{max-width:none}
}

/* Very wide: hold the middle rather than stretching lines nobody can read across. */
@media (min-width: 1500px) {
  body.tk-app .tk-screen{max-width:1180px}
}

/* ---------- "install as an app" bar (top of Home, phones) ----------
   In the page, not floating: it pushes Home down by one slim line and covers nothing. */
.install-nudge{
  /* slim, and tucked into Home's top padding, so "ไม่ไหวแล้ว" moves down as little as possible */
  display:flex;align-items:center;gap:4px;margin:-10px 0 8px;padding:2px 2px 2px 6px;
  background:var(--green-50);border:1px solid var(--green-100);border-radius:var(--radius-pill);
}
.install-nudge-go{
  flex:1 1 auto;min-width:0;display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 6px;
  background:none;border:0;color:var(--green-900);cursor:pointer;text-align:left;
  font-family:var(--font-core);font-size:13px;font-weight:var(--fw-semibold);white-space:nowrap;
}
.install-nudge-x{
  display:grid;place-items:center;width:26px;height:26px;flex:0 0 auto;padding:0;
  background:rgba(18,58,30,.07);border:0;border-radius:50%;color:var(--green-900);cursor:pointer;
}
.install-nudge-x svg{width:14px;height:14px}
/* tablets in the wide layout: the menu is at the top and this is a phone thing */
@media (min-width:1024px){body.tk-app .install-nudge{display:none}}

/* The toilet card inside the map sheet is part of the sheet, not a card on top of it.
   The soft-surface rule above gives every .toilet-card its own shadow and corners, which
   drew a second, shadowed edge hugging the bottom buttons ("ดูรายละเอียด" / "นำทาง"). */
body.tk-app .full-map-sheet .toilet-card,
html[data-tk-theme="dark"] body.tk-app .full-map-sheet .toilet-card{box-shadow:none;border-radius:0;background:transparent}

/* donate, web only (the iOS app never builds these) */
.tk-donate-card{display:flex;align-items:center;gap:16px;width:100%;margin:28px 0 0;padding:20px 18px;border:0;border-radius:var(--radius-lg);
  background:var(--surface-card);box-shadow:var(--shadow-card);text-align:left;font:inherit;color:var(--text-body);cursor:pointer}
.tk-donate-heart,.tk-row-heart{display:flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:16px;background:var(--coral-100);color:var(--coral-600);line-height:1}
.tk-donate-heart{width:52px;height:52px;font-size:26px}
.tk-row-heart{width:36px;height:36px;border-radius:12px;font-size:18px}
.tk-donate-text{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
.tk-donate-text strong{font-size:17px;font-weight:var(--fw-bold);color:var(--text-strong)}
.tk-donate-text span{font-size:14px;line-height:1.5;color:var(--text-muted)}
.tk-donate-card .tk-chevron{font-size:24px;color:var(--text-faint)}
@media (hover:hover){.tk-donate-card:hover{box-shadow:var(--shadow-raised)}}
.tk-heart-note{cursor:default}
@media (hover:hover){.tk-heart-note:hover{box-shadow:var(--shadow-card)}}

/* campaign: toilets at petrol stations (home) */
.tk-fuel-card{margin:20px 0 0;padding:20px 18px;border-radius:var(--radius-lg);background:var(--surface-card);color:var(--text-body)}   /* ขาว (เจ้าของ 1 ธ.ค.) */
.tk-fuel-head{display:flex;gap:14px;align-items:flex-start}
.tk-fuel-emoji{flex:0 0 auto;width:48px;height:48px;border-radius:14px;background:none;display:flex;align-items:center;justify-content:center;font-size:26px}
.tk-fuel-head strong{display:block;font-size:17px;color:var(--text-strong)}
.tk-fuel-head p{margin:4px 0 0;font-size:14px;line-height:1.55;color:var(--text-body)}
.tk-fuel-actions{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.tk-fuel-actions .btn{flex:1 1 140px}
.tk-fuel-actions .btn-secondary{background:var(--bg-page)}   /* ปุ่มขาวบนการ์ดขาวจะหาย: ใช้สีพื้นหน้าแทน */

/* share sheet: picture card + LINE first */
.tk-share-preview{display:flex;align-items:center;justify-content:center;min-height:120px;margin:0 0 16px}
.tk-share-preview img{display:block;width:100%;max-width:300px;border-radius:18px;border:1px solid var(--line-soft);box-shadow:var(--shadow-card)}
.tk-share-actions{display:flex;flex-direction:column;gap:10px}
.tk-share-actions .btn{width:100%;justify-content:center}
.tk-share-link{width:100%;font:inherit;font-size:14px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-card);color:var(--text-body)}
.tk-share-line{background:#06C755;color:#fff;border:0}
@media (hover:hover){.tk-share-line:hover{background:#05b34c;color:#fff}}

/* ---------- invitations (features.js): a small card, never a dialog ---------- */
.tk-nudge{position:fixed;left:50%;bottom:16px;z-index:2050;transform:translateX(-50%);
  width:min(440px,calc(100vw - 24px));padding:14px 44px 12px 16px;border-radius:var(--radius-card);
  background:var(--surface-card);border:1px solid var(--line-soft);box-shadow:var(--shadow-float);
  animation:tk-nudge-in .28s var(--ease-standard,ease-out)}
body.tk-app .tk-nudge{bottom:calc(var(--tk-bottom) + 12px)}
.tk-nudge-text{display:flex;gap:10px;align-items:flex-start;margin:0 0 10px;font-size:15px;line-height:1.55;color:var(--text-strong)}
.tk-nudge-emoji{font-size:22px;line-height:1.2}
.tk-nudge-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tk-nudge-mute{margin-left:auto;font-size:13px;color:var(--text-muted)}
.tk-nudge-x{position:absolute;top:8px;right:8px;width:30px;height:30px;padding:6px;border:0;border-radius:50%;
  background:transparent;color:var(--text-muted);cursor:pointer}
.tk-nudge-x svg{width:18px;height:18px}
@keyframes tk-nudge-in{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@media (prefers-reduced-motion:reduce){.tk-nudge{animation:none}}

/* ---------- movement, finished (2026-10-17) ----------
   One rule for everything you can press, and leaving is as smooth as arriving.
   Before this, some controls answered a tap and some did not (filter chips, the pin form's
   choices, the theme switch, close buttons), dialogs slid in but vanished in one frame, and
   the toast simply appeared. Same durations and curves as the rest: --dur-fast to answer a
   finger, --dur-base to come and go. */

/* 1 · everything pressable gives under the finger, with the same spring */
body.tk-app :is(.tag,.pin-kind,.facility-option,.tk-seg-btn,.tk-home-chip,.pin-modal-close,
  .tk-nav-donate,.tk-nav-pricing,.tk-nudge-x,.tk-link-btn,.footer-link-btn,[data-clean],[data-star]){
  transition:background var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-pop);
}
body.tk-app :is(.tag,.pin-kind,.facility-option,.tk-seg-btn,.tk-home-chip,.tk-nav-donate,.tk-nav-pricing):active{transform:scale(.96)}
body.tk-app :is(.pin-modal-close,.tk-nudge-x,[data-clean],[data-star]):active{transform:scale(.88)}
body.tk-app :is(.tk-link-btn,.footer-link-btn):active{opacity:.6}
body.tk-app .tk-row{transition:transform var(--dur-fast) var(--ease-pop),background var(--dur-fast) var(--ease-standard)}
@media (hover:hover){body.tk-app .tk-row:hover{background:rgba(20,38,26,.03)}}

/* 2 · the toast rises in instead of appearing */
.toast:not([hidden]){animation:tk-toast-in var(--dur-base) var(--ease-out-soft)}
@keyframes tk-toast-in{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translateX(-50%)}}

/* 3 · the map tab fades up rather than snapping in */
body.tk-app[data-tk-tab="map"] #fullMap:not([hidden]){animation:tk-fade var(--dur-base) var(--ease-standard)}

/* 4 · lists that fold open ("ดูทุกเขต (50)") show their contents gently */
details[open] > :not(summary){animation:tk-fade var(--dur-base) var(--ease-standard)}

/* 5 · dialogs, popups, the toast and the invitation card leave the way they came.
   Browsers that can hold an element on screen while [hidden] takes effect play the exit;
   the others close instantly, exactly as before. */
@supports (transition-behavior:allow-discrete){
  body.tk-app .pin-modal{transition:display var(--dur-base) allow-discrete}
  /* while it fades out it must not catch the next tap */
  body.tk-app .pin-modal[hidden],.toast[hidden]{pointer-events:none}
  body.tk-app .pin-modal .pin-modal-sheet,
  body.tk-app .pin-modal .pin-modal-backdrop{transition:opacity var(--dur-base) var(--ease-standard),transform var(--dur-base) var(--ease-standard)}
  body.tk-app .pin-modal[hidden] .pin-modal-backdrop{opacity:0}
  body.tk-app .pin-modal[hidden] .pin-modal-sheet{opacity:0;transform:translateY(28px)}
  body.tk-app .emergency-modal[hidden] .pin-modal-sheet{transform:scale(.94)}
  .toast{transition:display var(--dur-base) allow-discrete,opacity var(--dur-base) var(--ease-standard),transform var(--dur-base) var(--ease-standard)}
  .toast[hidden]{opacity:0;transform:translate(-50%,8px)}
}

@media (prefers-reduced-motion:reduce){
  .toast:not([hidden]),details[open] > :not(summary){animation:none}
}

/* ---------- 🧭 compass + walking mode (features.js) ---------- */
.tk-cxs{position:fixed;inset:0;z-index:2200;display:flex;flex-direction:column;background:var(--bg-page);
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);animation:tk-fade var(--dur-base) var(--ease-standard)}
.tk-cx-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px}
.tk-cx-back{display:inline-flex;align-items:center;gap:2px;height:40px;padding:0 16px 0 8px;border-radius:999px;cursor:pointer;
  background:var(--surface-card);border:1px solid var(--line-soft);box-shadow:var(--shadow-sm);font:inherit;font-weight:700;color:var(--text-strong);
  transition:transform var(--dur-fast) var(--ease-pop)}
.tk-cx-back:active{transform:scale(.96)}
.tk-cx-back svg{width:22px;height:22px}
.tk-cx-mode{font-weight:700;color:var(--text-muted);font-size:15px}
.tk-cx-main{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px 24px;text-align:center;min-height:0}
.tk-cx-name{margin:0 0 10px;font-size:20px;font-weight:700;color:var(--text-strong);max-width:420px}
.tk-cx-dial{position:relative;width:min(68vw,300px);aspect-ratio:1;margin:22px 0 30px;border-radius:50%;
  background:var(--surface-card);box-shadow:var(--shadow-card),inset 0 0 0 10px var(--surface-brand-soft)}
.tk-cx-rose{position:absolute;inset:0;transition:transform 120ms linear}
.tk-cx-n{position:absolute;top:16px;left:50%;transform:translateX(-50%);font-weight:800;font-size:15px;color:var(--coral-600,#C9483F)}
.tk-cx-arrow{position:absolute;inset:16%;width:68%;height:68%;transition:transform 140ms linear;filter:drop-shadow(0 6px 10px rgba(20,38,26,.18))}
.tk-cxs.is-near .tk-cx-arrow{opacity:.25}
.tk-cxs.is-near .tk-cx-dial{box-shadow:var(--shadow-card),inset 0 0 0 10px var(--green-300,#9CE27C)}
.tk-cx-dist{margin:0;font-size:44px;font-weight:800;line-height:1.1;color:var(--text-strong);font-variant-numeric:tabular-nums}
.tk-cx-sub{margin:0;font-size:17px;color:var(--text-body)}
.tk-cx-hint{margin:10px 0 0;font-size:14px;color:var(--text-muted);max-width:360px;line-height:1.55}
.tk-cx-alert{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:12px;padding:12px 16px;
  border-radius:16px;background:var(--surface-brand-soft);color:var(--text-strong);font-weight:600;animation:tk-pop-in var(--dur-slow) var(--ease-pop)}
.tk-cx-actions{display:flex;flex-direction:column;gap:10px;padding:12px 16px 20px;max-width:480px;width:100%;margin:0 auto}
@media (prefers-reduced-motion:reduce){.tk-cx-rose,.tk-cx-arrow{transition:none}}

/* the card's compass button and the home card that opens walking mode */
.card-compass{gap:4px;padding-left:12px;padding-right:12px}
.tk-walk-card{grid-column:1/-1;display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:14px 16px;border:0;border-radius:var(--radius-card);
  background:var(--surface-card);box-shadow:var(--shadow-card);font:inherit;text-align:left;cursor:pointer;color:inherit;
  transition:transform var(--dur-fast) var(--ease-pop)}
.tk-walk-card:active{transform:scale(.98)}
/* under the red button on a phone; the grid row gap spaces it on a computer */
#tkHome > .tk-walk-card{margin-top:14px}
.tk-walk-emoji{font-size:28px;line-height:1}
.tk-walk-text{flex:1 1 auto;display:flex;flex-direction:column;gap:2px}
.tk-walk-text b{color:var(--text-strong);font-size:16px}
.tk-walk-text span{color:var(--text-muted);font-size:14px}
/* on a computer: the compass explains it lives on phones */
.tk-cx-desk-body p{margin:0 0 10px;line-height:1.65;color:var(--text-body)}
.tk-cx-desk-foot{display:flex;flex-direction:column;gap:10px}

/* 📷 AR ชี้ทาง (ar.js): the camera, full screen, over the compass */
.tk-ar{position:fixed;inset:0;z-index:2300;overflow:hidden;background:#0f1a13;color:#fff;
  -webkit-user-select:none;user-select:none;touch-action:manipulation}
.tk-ar-cam{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#0f1a13;transition:filter .3s ease}
.tk-ar.no-camera .tk-ar-cam{display:none}
.tk-ar.no-camera{background:linear-gradient(180deg,#24402d 0%,#0f1a13 70%)}
.tk-ar.is-flat .tk-ar-cam{filter:brightness(.35) blur(3px)}
.tk-ar-layer{position:absolute;inset:0;transform-origin:50% 50%;pointer-events:none}
.tk-ar-layer[hidden]{display:none}
.tk-ar-label{position:absolute;left:0;top:0;display:flex;align-items:center;gap:8px;max-width:220px;padding:7px 14px 7px 7px;
  border:0;border-radius:999px;background:rgba(255,255,255,.94);color:var(--text-strong,#14261a);font:inherit;text-align:left;
  box-shadow:0 6px 18px rgba(0,0,0,.28);cursor:pointer;pointer-events:auto;visibility:hidden;transform-origin:50% 50%;will-change:transform}
.tk-ar-label img{width:30px;height:auto;flex:0 0 auto}
.tk-ar-ltext{display:flex;flex-direction:column;min-width:0}
.tk-ar-lname{font-size:14px;font-weight:700;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-ar-lmeta{font-size:12px;font-weight:600;line-height:1.3;color:var(--green-700,#2f6b3d);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-ar-label.is-target{background:var(--green-400,#76d344);box-shadow:0 0 0 3px #fff,0 8px 22px rgba(0,0,0,.35);z-index:2}
.tk-ar-label.is-target .tk-ar-lmeta{color:var(--green-900,#14361d)}
.tk-ar-edge{position:absolute;left:10px;display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;transform:translateY(-50%);
  background:rgba(15,26,19,.78);font-weight:700;font-size:15px;pointer-events:none;flex-direction:row-reverse;left:auto;right:10px}
.tk-ar-edge.is-left{flex-direction:row;right:auto;left:10px}
.tk-ar-edge[hidden]{display:none}
.tk-ar-edge-arrow{width:0;height:0;border-top:12px solid transparent;border-bottom:12px solid transparent;border-left:16px solid var(--green-400,#76d344)}
.tk-ar-edge.is-left .tk-ar-edge-arrow{border-left:0;border-right:16px solid var(--green-400,#76d344)}
.tk-ar-flat{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:0 32px;text-align:center;pointer-events:none}
.tk-ar-flat[hidden]{display:none}
.tk-ar-flat-arrow{width:min(52vw,220px);height:auto;transition:transform 140ms linear;filter:drop-shadow(0 8px 16px rgba(0,0,0,.4))}
.tk-ar-flat p{margin:0;font-size:17px;font-weight:700;line-height:1.5}
.tk-ar-glow{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity .25s linear;
  box-shadow:inset 0 0 90px 30px rgba(118,211,68,.95);background:radial-gradient(ellipse at center,rgba(118,211,68,0) 45%,rgba(118,211,68,.35) 100%)}
.tk-ar-top{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;gap:10px;
  padding:calc(env(safe-area-inset-top) + 10px) 14px 10px;background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,0))}
.tk-ar-back{display:inline-flex;align-items:center;gap:2px;height:40px;padding:0 14px 0 8px;border-radius:999px;border:0;cursor:pointer;
  background:rgba(255,255,255,.94);font:inherit;font-weight:700;color:var(--text-strong,#14261a)}
.tk-ar-back svg{width:22px;height:22px}
.tk-ar-title{flex:1 1 auto;font-weight:700;font-size:15px;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.tk-ar-acc{padding:4px 10px;border-radius:999px;background:rgba(15,26,19,.7);font-size:12.5px;font-weight:700;white-space:nowrap}
.tk-ar-acc.is-weak{background:rgba(201,72,63,.85)}
.tk-ar-acc[hidden]{display:none}
.tk-ar-hint{position:absolute;left:16px;right:16px;bottom:calc(env(safe-area-inset-bottom) + 196px);margin:0 auto;max-width:440px;padding:0;
  text-align:center;font-size:14px;font-weight:600;line-height:1.5;text-shadow:0 1px 4px rgba(0,0,0,.8);pointer-events:none}
.tk-ar-hint:empty{display:none}
.tk-ar-hint.is-warn{padding:10px 14px;border-radius:14px;background:rgba(201,72,63,.92);text-shadow:none;font-size:16px}
.tk-ar-panel{position:absolute;left:0;right:0;bottom:0;padding:16px 16px calc(env(safe-area-inset-bottom) + 16px);
  background:linear-gradient(0deg,rgba(0,0,0,.78) 55%,rgba(0,0,0,0));text-align:center}
.tk-ar-name{margin:0;font-size:17px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-ar-dist{margin:2px 0 0;font-size:34px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.tk-ar-sub{margin:2px 0 10px;font-size:14px;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-ar-sub:empty{display:none}
.tk-ar-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:480px;margin:0 auto}
.tk-ar-toggle{flex:1 1 100%;min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid rgba(255,255,255,.6);background:rgba(255,255,255,.12);
  font:inherit;font-weight:700;font-size:14px;color:#fff;cursor:pointer}
.tk-ar-toggle[aria-pressed="true"]{background:var(--green-400,#76d344);border-color:var(--green-400,#76d344);color:var(--green-900,#14361d)}
.tk-ar-buttons .btn{flex:1 1 0}
.tk-ar.is-near .tk-ar-dist{color:var(--green-300,#9CE27C)}
.tk-cx-ar{font-weight:700}
@media (prefers-reduced-motion:reduce){.tk-ar-flat-arrow,.tk-ar-glow,.tk-ar-cam{transition:none}}

/* ---------- ⛽ petrol stations and rest areas (features.js) ---------- */
/* a confirmed one wears a small badge on the usual pin */
.tk-pin-fuel{position:relative}
.tk-pin-fuel img{display:block}
.tk-pin-badge{position:absolute;right:-6px;top:-4px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;
  background:var(--surface-card);box-shadow:0 2px 6px rgba(20,38,26,.25);font-size:13px;line-height:1}
.tk-pin-badge.is-left{right:auto;left:-6px}
/* 👍 คนแนะนำ: a warm ring so it reads as praise, not as one more kind of pin */
.tk-pin-badge.is-up{width:24px;height:24px;background:none;box-shadow:none;filter:drop-shadow(0 2px 3px rgba(20,38,26,.3))}
.tk-pin-badge.is-up img{display:block;width:24px;height:24px}
.tk-pin-badge.is-low{top:auto;bottom:-2px;right:-6px}
/* the card: the two counts, then the button (only for someone who went there) */
.tk-vote{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin:10px 0 4px;padding:10px 12px;
  border-radius:var(--radius-md,14px);background:var(--surface-brand-soft)}
.tk-vote-facts{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13.5px;color:var(--text-body)}
.tk-vote-fact.is-up{display:inline-flex;align-items:center;gap:5px;font-weight:var(--fw-semibold);color:#6B4B00}
.tk-vote-ic{width:20px;height:20px;flex:none}
.tk-vote-btn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border:1.5px solid var(--sun-400);border-radius:var(--radius-pill);
  background:var(--surface-card);color:var(--text-strong);font:inherit;font-size:14px;font-weight:var(--fw-semibold);cursor:pointer}
.tk-vote-btn.is-on{background:var(--sun-100);border-color:var(--sun-600)}
.tk-vote-btn:active{transform:scale(var(--press-scale))}
.tk-vote-hint{margin:10px 0 4px;font-size:13px;color:var(--text-muted)}
html[data-tk-theme="dark"] .tk-vote-fact.is-up{color:var(--sun-400)}
html[data-tk-theme="dark"] .tk-vote-btn.is-on{background:rgba(255,197,61,.18)}
/* an unconfirmed one: grey, round, with a question mark — clearly not a toilet pin */
.tk-fuel-marker{background:none;border:0}
.tk-fuel-pin{position:relative;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;
  background:var(--surface-card,#fff);border:2px dashed #8A968E;box-shadow:0 3px 8px rgba(20,38,26,.22);
  font-size:16px;line-height:1}
.tk-fuel-pin i{position:absolute;right:-4px;bottom:-4px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;
  background:var(--text-muted,#6B7A70);color:#fff;font-style:normal;font-size:11px;font-weight:800}
.tk-fuel-zoom-note{position:absolute;left:50%;top:150px;z-index:1000;transform:translateX(-50%);max-width:calc(100% - 32px);margin:0;
  padding:8px 14px;border-radius:999px;background:var(--surface-card);box-shadow:var(--shadow-map);font-size:13px;color:var(--text-body);text-align:center}
.tk-fuel-q{margin:0 0 12px;font-size:16px;color:var(--text-strong)}
.tk-fuel-yn{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tk-fuel-note{margin:12px 0 0;font-size:12px;color:var(--text-muted)}
.tk-fuel-foot{display:grid;grid-template-columns:1fr 1fr;gap:10px}
/* "ไม่ไหวแล้ว" with nothing confirmed nearby */
.tk-em-fuel{margin-top:16px;padding:14px 16px;border-radius:16px;background:var(--bg-sunken,#EBEEE8);text-align:left}
.tk-em-fuel p{margin:0 0 10px;line-height:1.55;color:var(--text-strong)}
.tk-em-fuel p span{font-size:13px;color:var(--text-muted)}
.tk-em-fuel-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}

/* ---------- bigger text / stronger colours (Profile › Display) ----------
   Text sizes here are written in px all over, so "bigger" scales whole screens and sheets
   rather than chasing every rule. The map itself is never scaled — a zoomed map puts taps
   in the wrong place — only the cards and sheets drawn over it. */
html[data-tk-text="large"] body.tk-app :is(.tk-screen, main, .pin-modal-sheet, .full-map-sheet, .tk-cxs){zoom:1.15}
html[data-tk-text="xl"] body.tk-app :is(.tk-screen, main, .pin-modal-sheet, .full-map-sheet, .tk-cxs){zoom:1.3}
/* darker grey text and firmer lines, light and dark theme alike (the ink scale flips with the theme) */
html[data-tk-contrast="high"]{
  --text-body:var(--ink-900);--text-muted:var(--ink-700);--text-faint:var(--ink-600);
  --line-soft:var(--ink-300);--line:var(--ink-400);--line-strong:var(--ink-500);
}
.tk-setting-sub{display:block;margin-top:2px;font-size:12px;font-weight:var(--fw-regular);color:var(--text-muted)}
/* with bigger text a card's buttons no longer fit in one row: let them wrap, and put
   "นำทาง" on its own full-width line first so it is never the one pushed off the edge */
html[data-tk-text] body.tk-app .full-map-sheet :is(.card-actions, .tk-cc-actions),
html[data-tk-text] body.tk-app .pin-modal-sheet .card-actions{flex-wrap:wrap}
html[data-tk-text] body.tk-app :is(.full-map-sheet, .pin-modal-sheet) .card-actions [data-navigate]{order:-1;flex:1 1 100%}
html[data-tk-text] body.tk-app .full-map-sheet .tk-cc-btn{flex:1 1 auto}
html[data-tk-text] body.tk-app .full-map-sheet .tk-cc-btn.is-icon{flex:0 0 auto}
/* bigger text: the switch drops under its label instead of squeezing it */
html[data-tk-text] body.tk-app .tk-setting{flex-wrap:wrap;row-gap:8px}
html[data-tk-text] body.tk-app .tk-setting-label{flex:1 0 auto}

/* ---------- compass waves (features.js · CX_BANDS) ----------
   Colour says how far: red, orange, yellow, then green that stays once you are there.
   They pulse faster as you close in. Behind the dial, so the arrow is never covered. */
.tk-cxs{--cx-wave:var(--coral-500,#E8442A);--cx-speed:2.6s}
.tk-cxs[data-band="mid"]{--cx-wave:#F08A24;--cx-speed:2s}
.tk-cxs[data-band="close"]{--cx-wave:var(--sun-600,#D99A00);--cx-speed:1.3s}
.tk-cxs[data-band="here"]{--cx-wave:var(--green-500,#63C13C);--cx-speed:1.8s}
.tk-cx-wave{position:absolute;inset:0;z-index:-1;border-radius:50%;pointer-events:none;
  animation:tk-cx-wave var(--cx-speed) var(--ease-out-soft) infinite}
/* the same short swell as the "ไม่ไหวแล้ว" button: two waves that roll a little way off the
   dial's edge and fade, so they never reach the place name above or the distance below */
.tk-cx-wave:nth-child(2){animation-delay:calc(var(--cx-speed) / -2)}
.tk-cx-wave:nth-child(3){display:none}
.tk-cxs:not([data-band]) .tk-cx-wave{display:none}
@keyframes tk-cx-wave{
  0%{box-shadow:0 0 0 0 color-mix(in srgb, var(--cx-wave) 45%, transparent)}
  100%{box-shadow:0 0 0 22px color-mix(in srgb, var(--cx-wave) 0%, transparent)}
}
/* the dial's own ring takes the same colour, so the colour reads even between pulses */
.tk-cxs[data-band] .tk-cx-dial{box-shadow:var(--shadow-card),inset 0 0 0 10px color-mix(in srgb, var(--cx-wave) 55%, transparent)}
.tk-cxs[data-band="here"] .tk-cx-dial{box-shadow:var(--shadow-card),inset 0 0 0 12px var(--cx-wave),0 0 0 6px color-mix(in srgb, var(--cx-wave) 30%, transparent)}
.tk-cxs[data-band="here"] .tk-cx-dist{color:var(--green-700,#357A1E)}
html[data-tk-theme="dark"] .tk-cxs[data-band="here"] .tk-cx-dist{color:var(--green-600)}
@media (prefers-reduced-motion:reduce){
  /* no pulsing: one still ring in the same colour carries the same message */
  .tk-cx-wave{animation:none}
  .tk-cx-wave:first-child{box-shadow:0 0 0 10px color-mix(in srgb, var(--cx-wave) 30%, transparent)}
}
.tk-cx-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tk-cx-toggles{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:0 16px}
.tk-cx-toggle{height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface-card);
  font:inherit;font-size:14px;font-weight:600;color:var(--text-body);cursor:pointer}
.tk-cx-toggle[aria-pressed="true"]{background:var(--green-100);border-color:var(--green-400);color:var(--green-800)}
.sr-focus:focus{outline:none}

/* ---------- ขี้บอกสุขภาพ (app/health.js) ----------
   Built from Home's own parts: section heads, the white soft cards, stat blocks, quick
   cards, profile rows and the app's sticker icons. Colours are the site's tokens only.
   Phone: one column, in the order it is used. Computer: rows whose two halves share a top
   edge (both start with a heading) and a bottom edge (the shorter card stretches):
   วันนี้ | ภาพรวม · the seven, across · ปฏิทิน | that day + ให้หมอดู · รู้ไว้, four across · ข้อมูลของฉัน. */
.hl-wrap{display:grid;grid-template-columns:minmax(0,1fr);
  grid-template-areas:"art" "today" "picker" "stats" "cal" "day" "know" "data" "foot"}
/* the page's illustration (scene-health): whole picture on a phone, a wide band on a computer
   that keeps the speech bubble, both characters and their shoes */
.hl-art{grid-area:art;display:block;width:100%;height:auto;aspect-ratio:1640/923;object-fit:cover;margin:4px 0 14px;
  border-radius:var(--radius-card);border:1px solid var(--line-soft);background:#fff}
html[data-tk-theme="dark"] .hl-art{filter:brightness(.9);border-color:transparent}
.hl-sec-today{grid-area:today}.hl-sec-picker{grid-area:picker}.hl-sec-stats{grid-area:stats}.hl-sec-cal{grid-area:cal}
.hl-sec-day{grid-area:day}.hl-sec-know{grid-area:know}.hl-sec-data{grid-area:data}.hl-wrap > .hl-disclaim{grid-area:foot}
.hl-sec-today > .tk-section-head:first-child{margin-top:4px}
@media (min-width: 1024px) {
  .hl-wrap{grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:stretch;
    grid-template-areas:
      "art art art art art art art art art art art art"
      "today today today today today stats stats stats stats stats stats stats"
      "picker picker picker picker picker picker picker picker picker picker picker picker"
      "cal cal cal cal cal cal cal day day day day day"
      "know know know know know know know know know know know know"
      "data data data data data data data data data data data data"
      "foot foot foot foot foot foot foot foot foot foot foot foot"}
  .hl-sec{display:flex;flex-direction:column;min-width:0}
  .hl-art{aspect-ratio:2.2/1;object-position:50% 55%;margin-bottom:20px}
  .hl-sec-stats > .tk-section-head:first-child{margin-top:4px}
  /* today: the card fills the height of the overview beside it, its content centred */
  .hl-sec-today .hl-today{flex:1;flex-direction:column;justify-content:center;text-align:center;gap:10px}
  .hl-sec-today .hl-today .tk-where-icon{width:72px;height:72px}
  .hl-sec-today .hl-today .tk-where-text{flex:0 0 auto;align-items:center}
  .hl-sec-today .hl-today strong{font-size:22px}
  /* that day: the list card grows to the calendar's height, ให้หมอดู sits at its foot */
  .hl-sec-day .hl-daycard{flex:1}
  .hl-sec-day .hl-gap{margin-top:12px}
  .hl-main .hl-types,.hl-sec-picker .hl-types{grid-template-columns:repeat(7,minmax(0,1fr))}
  .hl-sec-picker .hl-type-art{height:68px}.hl-sec-picker .hl-type-art img{width:68px;height:68px}
  body.tk-app #tkHealth .hl-quick{grid-template-columns:repeat(4,minmax(0,1fr))}
  body.tk-app #tkHealth .hl-sec-data .tk-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.hl-main > .tk-where:first-child{margin-top:4px}
.hl-ok{background:var(--green-500)}.hl-hard{background:var(--sun-600)}.hl-soft{background:var(--sky-400)}.hl-loose{background:var(--sky-600)}
.hl-bar{display:block;width:24px;height:4px;border-radius:4px}

/* the seven pictures */
.hl-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
/* seven in a row only where each still has room for its name on one line */
.hl-type{
  display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;
  padding:12px 4px 10px;margin:0;border:0;border-radius:20px;background:var(--surface-card);
  box-shadow:none;
  font:inherit;color:var(--text-body);cursor:pointer;transition:transform var(--dur-fast) var(--ease-pop);
}
.hl-type:active{transform:scale(var(--press-scale))}
.hl-type-art{display:flex;align-items:center;justify-content:center;width:100%;height:56px}
.hl-type-art img{width:56px;height:56px}
.hl-type-name{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:calc(2.6em + 2px);font-size:12.5px;line-height:1.3;text-align:center;overflow-wrap:anywhere}
.hl-type .hl-bar{margin-top:auto}
.hl-type-name b{color:var(--text-strong)}
.hl-type.is-on{background:var(--green-50);box-shadow:inset 0 0 0 2px var(--green-400)}
.hl-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:12px 4px 0;font-size:12.5px;color:var(--text-muted)}
.hl-legend span{display:inline-flex;align-items:center;gap:6px}.hl-legend .hl-bar{width:14px}

/* segmented choices (7/30/90 วัน, ถ่ายยากไหม) */
.hl-seg{display:inline-flex;padding:3px;border-radius:var(--radius-pill);background:var(--surface-card);box-shadow:var(--shadow-sm)}
.hl-seg button{height:30px;padding:0 12px;border:0;border-radius:var(--radius-pill);background:none;font:inherit;font-size:13px;font-weight:var(--fw-semibold);color:var(--text-muted);cursor:pointer;white-space:nowrap}
.hl-seg button[aria-selected="true"]{background:var(--green-400);color:var(--green-900)}
.hl-seg.is-wide{display:grid;grid-template-columns:repeat(3,1fr);width:100%;background:var(--bg-page);box-shadow:none}
.hl-seg.is-wide button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:48px;font-size:15px}

/* overview */
.hl-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hl-stat{align-items:center;justify-content:center;gap:4px;padding:16px 8px;text-align:center}
.hl-stat .sticker{width:40px;height:40px;margin-bottom:2px}
.hl-stat .value{font-size:26px}.hl-stat .value small{font-size:14px;color:var(--text-muted)}
.hl-stat .label{font-size:13px;line-height:1.35}
.hl-tip{margin:12px 2px 0;padding:12px 14px;border-radius:16px;background:var(--surface-brand-soft);font-size:14px;color:var(--text-strong)}
.hl-alert{width:100%;margin-top:12px;font:inherit;text-align:left;cursor:pointer;background:var(--coral-100);border-color:transparent}
.hl-alert-mark{display:grid;place-items:center;flex:0 0 auto;width:36px;height:36px;border-radius:12px;background:var(--coral-500);color:#fff;font-weight:800}
.hl-gap{margin-top:16px;grid-template-columns:1fr!important}
.hl-row-text{display:flex;flex-direction:column;flex:1;min-width:0}
.hl-row-text small{font-size:13px;font-weight:var(--fw-regular);color:var(--text-muted)}
#tkHealth .tk-row[disabled]{cursor:default;color:var(--text-muted)}
#tkHealth .tk-row[disabled] img{filter:grayscale(1);opacity:.55}
#tkHealth .tk-row[disabled] .tk-chevron{visibility:hidden}
#tkHealth .tk-row > span:not(.tk-chevron):not(.hl-row-text){flex:1}

/* calendar */
.hl-cal{padding:14px 14px 12px}
.hl-cal .hl-legend{justify-content:center;margin-top:8px}
.hl-cal-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hl-cal-head b{font-size:17px;color:var(--text-strong)}
.hl-cal-head .tk-icon-btn{font-size:22px;line-height:1;color:var(--text-strong)}
.hl-cal-head .tk-icon-btn:disabled{opacity:.3}
.hl-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-top:10px}
.hl-wk{padding:4px 0;text-align:center;font-size:12px;font-weight:var(--fw-semibold);color:var(--text-muted)}
.hl-day{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:52px;padding:6px 0;border:0;border-radius:12px;background:none;font:inherit;color:var(--text-strong);cursor:pointer}
.hl-day span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;font-size:14px;font-weight:var(--fw-semibold)}
.hl-day.is-today span{background:var(--green-900);color:#fff}
.hl-day.is-picked{background:var(--green-50);box-shadow:inset 0 0 0 1.5px var(--green-300)}
.hl-day.is-future{opacity:.35;cursor:default}
.hl-dot{display:grid;place-items:center;width:16px;height:16px;border-radius:50%;font-style:normal;font-size:10px;font-weight:800;color:#fff}
.hl-dot.is-none{background:transparent}
.hl-dot.is-flag{box-shadow:0 0 0 2px var(--surface-card),0 0 0 3.5px var(--coral-500)}
.hl-daycard{padding:6px 14px}
.hl-daylist{list-style:none;margin:0;padding:0}
.hl-daylist li + li{border-top:1px solid var(--line-soft)}
.hl-daycard .hl-muted{margin:12px 0}
.hl-daylist-h{font-size:14px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.hl-daylist li{display:flex;align-items:center;gap:12px;padding:10px 0}
.hl-li{flex:1;min-width:0}.hl-li b{display:block;font-size:14px;color:var(--text-strong)}
.hl-li small{display:block;font-size:12.5px;color:var(--text-muted);overflow-wrap:anywhere}
.hl-x{width:36px;height:36px;font-size:18px;color:var(--text-muted)}
.hl-muted{margin:6px 0 0;font-size:14px;color:var(--text-muted)}

/* read, then housekeeping */
/* phone and tablet: two by two, rows one per line (the computer rows above set their own) */
@media (max-width: 1023px) {
  body.tk-app #tkHealth .hl-quick{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.tk-app #tkHealth .tk-list{grid-template-columns:1fr}
}
@media (min-width: 1024px) { body.tk-app #tkHealth .hl-sec-day .tk-list{grid-template-columns:1fr} }
.hl-privacy{margin:12px 6px 0;font-size:13px;line-height:1.6;color:var(--text-muted)}
.hl-warn{margin:10px 0 0;padding:10px 12px;border-radius:14px;background:var(--coral-100);color:var(--coral-600);font-size:13.5px}
.hl-wipe{display:block;margin:14px auto 0;padding:8px 14px;border:0;background:none;font:inherit;font-size:14px;font-weight:var(--fw-semibold);color:var(--coral-600);cursor:pointer}
.hl-disclaim{margin:28px 6px 0;text-align:center;font-size:12px;line-height:1.6;color:var(--text-faint)}
.hl-disclaim a{color:inherit}

/* sheets */
body.hl-sheet-open{overflow:hidden}
.hl-sheet{position:fixed;inset:0;z-index:2050;display:flex;align-items:flex-end;justify-content:center;background:rgba(20,38,26,.45)}
.hl-sheet[hidden]{display:none}
.hl-sheet-card{
  width:100%;max-width:560px;max-height:92vh;overflow:auto;padding:20px 18px 0;
  border-radius:var(--radius-xl) var(--radius-xl) 0 0;background:var(--surface-card);
  overscroll-behavior:contain;touch-action:pan-y pinch-zoom;
}
@media (min-width: 600px) { .hl-sheet{align-items:center} .hl-sheet-card{border-radius:var(--radius-xl)} }
.hl-sheet-card h3{margin:0 0 12px;font-size:19px}
.hl-sheet-card h3:not(:first-child){margin-top:22px}
.hl-label{margin:18px 2px 8px;font-size:14px;font-weight:var(--fw-semibold);color:var(--text-strong)}
/* the log sheet as five numbered steps */
.hl-sheet-sub{margin:-6px 0 4px;font-size:13.5px;line-height:1.5;color:var(--text-muted)}
.hl-step{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;margin:20px 2px 10px;font-size:15px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.hl-step b{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:var(--green-400);color:var(--text-on-brand);font-size:13px}
.hl-step small{font-size:12.5px;font-weight:var(--fw-regular,400);color:var(--text-muted)}
.hl-symptoms{display:flex;flex-wrap:wrap;gap:8px}
.hl-sym{min-height:40px;padding:0 14px;border:1.5px solid var(--line);border-radius:var(--radius-pill);background:var(--surface-card);
  font:inherit;font-size:14px;color:var(--text-body);cursor:pointer}
.hl-sym.is-on{background:var(--green-50);border-color:var(--green-400);color:var(--text-strong);font-weight:var(--fw-semibold)}
.hl-sheet-foot .btn[disabled]{opacity:.55;cursor:not-allowed}
/* the today card's button */
.hl-log-btn{margin-top:12px;gap:8px}
.hl-log-btn span[aria-hidden]{font-size:22px;line-height:1}
.hl-doc-sym{display:flex;flex-wrap:wrap;gap:4px 14px}
.hl-colors{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.hl-color{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 0;border:0;border-radius:14px;background:none;font:inherit;font-size:11.5px;line-height:1.3;color:var(--text-muted);cursor:pointer}
.hl-color.is-on{background:var(--green-50);box-shadow:inset 0 0 0 2px var(--green-400);color:var(--text-strong)}
.hl-sw{display:inline-block;flex:0 0 auto;border-radius:50%;box-shadow:inset 0 0 0 1.5px rgba(20,38,26,.25);vertical-align:-3px}
.hl-fields{margin-top:6px}
.hl-sheet-foot{
  position:sticky;bottom:0;display:grid;grid-template-columns:1fr 2fr;gap:10px;
  margin:18px -18px 0;padding:12px 18px calc(12px + env(safe-area-inset-bottom));
  background:var(--surface-card);border-top:1px solid var(--line-soft);
}
.hl-sheet-foot .btn-full{grid-column:1 / -1}
.hl-lines{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.hl-lines li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:16px;background:var(--bg-page)}
.hl-lines li > span:not(.hl-flag){flex:1;min-width:0}
.hl-line-ic,.hl-lines .hl-shape{flex:0 0 auto}
.hl-lines b{display:block;font-size:14.5px;color:var(--text-strong)}
.hl-lines small{display:block;font-size:13px;color:var(--text-muted)}
.hl-lines.is-urgent li{background:var(--coral-100)}
.hl-flag{display:grid;place-items:center;flex:0 0 auto;width:22px;height:22px;border-radius:50%;background:var(--coral-500);color:#fff;font-size:13px;font-weight:800}
.hl-call{margin:12px 0 4px}
.hl-note{margin:12px 2px 0;font-size:13px;line-height:1.6;color:var(--text-muted)}

/* the doctor's page */
.hl-doc-tools{display:flex;justify-content:flex-end;margin-bottom:6px}
.hl-doc-meta{font-size:13px;line-height:1.6;color:var(--text-muted)}
.hl-doc-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.hl-doc-nums div{padding:10px 6px;border-radius:14px;background:var(--bg-page);text-align:center}
.hl-doc-nums b{display:block;font-size:20px;color:var(--text-strong)}.hl-doc-nums small{font-size:12px;color:var(--text-muted)}
.hl-doc-bars{list-style:none;margin:0;padding:0}
.hl-doc-bars li{display:grid;grid-template-columns:minmax(120px,42%) 1fr auto;align-items:center;gap:10px;margin:0 0 6px;font-size:13px}
.hl-track{height:10px;border-radius:99px;background:var(--bg-page);overflow:hidden}.hl-track i{display:block;height:100%;border-radius:inherit}
.hl-doc-flags{margin:8px 0 0;font-size:13.5px}
.hl-doc table{width:100%;margin-top:12px;border-collapse:collapse;font-size:13px}
.hl-doc th,.hl-doc td{padding:6px;border-bottom:1px solid var(--line-soft);text-align:left;vertical-align:top}
.hl-doc th{font-size:12px;color:var(--text-muted)}
@media print {
  body.hl-print > *:not(.hl-sheet){display:none!important}
  html:has(body.hl-print),body.hl-print{background:#fff!important}
  body.hl-print .hl-sheet{position:static;display:block;background:none}
  body.hl-print .hl-sheet-card{max-width:none;max-height:none;padding:0;border-radius:0;overflow:visible;background:#fff;box-shadow:none}
  body.hl-print .hl-sheet-foot,body.hl-print .hl-doc-tools{display:none}
  body.hl-print .hl-track i,body.hl-print .hl-sw{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ---------- Home · สุขภาพขี้ (app/health.js), above "เล่นระหว่างรอ" ----------
   Three cards: the level on the left, the week and the numbers stacked beside it, then one
   row into the full screen. Same soft cards and type as the rest of Home. */
.hl-home-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:auto auto;gap:10px}
.hl-home-grid > div{margin:0;border:0;font:inherit;text-align:left;color:var(--text-body)}
.hl-home-cap{display:block;font-size:12.5px;font-weight:var(--fw-semibold);color:var(--text-muted)}
.hl-home-level{grid-row:1 / 3;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:16px 10px;text-align:center!important}
.hl-home-level svg{display:block;margin-bottom:6px}
.hl-ring-bg{fill:none;stroke:var(--ink-100);stroke-width:8}
.hl-ring{fill:none;stroke:var(--green-500);stroke-width:8;stroke-linecap:round}
.hl-home-level.is-fair .hl-ring{stroke:var(--sun-600)}
.hl-home-level.is-low .hl-ring,.hl-home-level.is-flag .hl-ring{stroke:var(--coral-500)}
.hl-ring-num{position:absolute;top:16px;left:0;right:0;height:88px;display:grid;place-items:center;font-size:20px;font-weight:var(--fw-bold);color:var(--text-strong)}
.hl-home-level b{font-size:20px;color:var(--text-strong)}
.hl-home-level.is-good b{color:var(--green-700)}.hl-home-level.is-fair b{color:var(--sun-600)}
.hl-home-level.is-low b,.hl-home-level.is-flag b{color:var(--coral-600)}
.hl-home-level small{font-size:12.5px;line-height:1.4;color:var(--text-muted)}
.hl-home-week,.hl-home-stats{padding:12px 14px}
.hl-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;margin-top:8px}
.hl-wday{display:flex;flex-direction:column;align-items:center;gap:4px}
.hl-wday small{font-size:11px;color:var(--text-muted)}
.hl-dot.is-empty{background:transparent;box-shadow:inset 0 0 0 1.5px var(--ink-200)}
.hl-home-nums{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
.hl-home-nums b{display:block;font-size:22px;line-height:1.2;color:var(--text-strong);font-variant-numeric:tabular-nums}
.hl-home-nums b em{font-style:normal;font-size:13px;color:var(--text-muted)}
.hl-home-nums small{font-size:12px;color:var(--text-muted)}
.hl-home-more{margin-top:10px}

/* the quick-card grid carries Home's top margin; under a section head it only needs the head's own gap */
#tkHealth .hl-quick{margin-top:0}

/* profile: "ติดตาม THEEKHEE บน Facebook" — a round badge in Facebook blue where the other rows have a sticker */
.tk-row-fb{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;background:#1877F2;color:#fff;
  font:700 20px/1 Helvetica,Arial,sans-serif;padding-top:3px;box-sizing:border-box}

/* ---------- หมุดของคุณ (profile) + "ช่วยคนเพิ่มอีก" (home) ---------- */
.tk-impact{display:flex;align-items:center;gap:14px;margin:0 0 10px;padding:16px 18px;border-radius:20px;
  background:var(--surface-brand-soft);color:var(--text-strong)}
.tk-impact img{width:52px;height:52px;flex:0 0 auto}
.tk-impact-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.tk-impact-label{font-size:14px;font-weight:var(--fw-semibold);color:var(--text-muted)}
.tk-impact-num{font-size:15px;color:var(--text-muted)}
.tk-impact-num b{font-size:34px;line-height:1.1;font-weight:var(--fw-bold);color:var(--green-700)}
.tk-impact-sub{font-size:13px;color:var(--text-muted)}
.tk-impact.is-empty{background:var(--surface-card)}
.tk-impact.is-empty img{width:40px;height:40px;opacity:.85}
.tk-impact.is-empty .tk-impact-label{color:var(--text-strong)}
#tkMyPins{scroll-margin-top:96px}
.tk-impact-note{margin:8px 6px 0;font-size:12px;line-height:1.5;color:var(--text-faint)}
.tk-mypins .tk-place-sub{white-space:normal}
.tk-mypins-more{min-height:48px;justify-content:center;font-size:15px;color:var(--green-700)}
.tk-mypins-more .tk-chevron{margin-left:0}

.tk-impact-slot:empty{display:none}
.tk-impact-banner{position:relative;margin:16px 0 0}
.tk-impact-go{display:flex;align-items:center;gap:12px;width:100%;padding:12px 44px 12px 14px;border:0;border-radius:18px;
  background:var(--surface-brand-soft);font:inherit;text-align:left;color:var(--text-strong);cursor:pointer;
  transition:transform var(--dur-fast) var(--ease-pop)}
.tk-impact-go:active{transform:scale(.985)}
.tk-impact-go img{width:40px;height:40px;flex:0 0 auto}
.tk-impact-go .tk-impact-text b{font-size:15px;font-weight:var(--fw-bold)}
.tk-impact-go .tk-impact-text small{font-size:13px;color:var(--text-muted)}
.tk-impact-close{position:absolute;top:50%;right:6px;transform:translateY(-50%);width:36px;height:36px;border:0;border-radius:50%;
  background:transparent;color:var(--text-faint);font-size:22px;line-height:1;cursor:pointer}

/* ---------- 🎟 สมุดสะสมห้องน้ำ (features.js) ---------- */
.tk-pass{flex:1 1 auto;min-height:0;overflow:auto;padding:24px 20px 8px;-webkit-overflow-scrolling:touch}
.tk-pass-head{text-align:center}
.tk-pass-head img{width:64px;height:64px}
.tk-pass-head h3{margin:6px 0 2px;font-size:22px;line-height:1.3}
.tk-pass-head p{margin:0;font-size:14px;color:var(--text-muted)}
.tk-pass-nums{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0 0}
.tk-pass-nums span{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 6px;border-radius:16px;background:var(--surface-brand-soft)}
.tk-pass-nums b{font-size:26px;line-height:1.1;font-weight:var(--fw-bold);color:var(--green-700)}
.tk-pass-nums em{font-style:normal;font-size:14px;font-weight:var(--fw-medium);color:var(--text-muted)}
.tk-pass-nums small{font-size:12px;color:var(--text-muted);text-align:center}
.tk-pass-next{margin:14px 2px 0;font-size:14px;color:var(--text-body)}
.tk-pass-next i{display:block;height:8px;margin-top:6px;border-radius:99px;background:var(--line-soft);overflow:hidden}
.tk-pass-next i b{display:block;height:100%;border-radius:99px;background:var(--green-500)}
.tk-pass-badges{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 0}
.tk-pass-badges span{padding:4px 10px;border-radius:99px;font-size:13px;color:var(--text-faint);background:var(--bg-sunken);filter:grayscale(1)}
.tk-pass-badges span.is-on{color:var(--green-800);background:var(--surface-brand-soft);filter:none;font-weight:var(--fw-semibold)}
.tk-pass-group{margin:20px 2px 8px;font-size:var(--type-eyebrow-size);letter-spacing:var(--type-eyebrow-ls);font-weight:var(--fw-semibold);color:var(--text-muted)}
.tk-pass-kinds{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.tk-pass-kinds span{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;opacity:.35;filter:grayscale(1)}
.tk-pass-kinds span.is-on{opacity:1;filter:none}
.tk-pass-kinds img{width:40px;height:40px}
.tk-pass-kinds small{font-size:11px;line-height:1.3;color:var(--text-body)}
.tk-pass-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.tk-pass-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:14px;background:var(--bg-sunken)}
.tk-pass-list img{width:30px;height:30px;flex:0 0 auto}
.tk-pass-list span{display:flex;flex-direction:column;min-width:0}
.tk-pass-list b{font-size:14px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-pass-list small{font-size:12px;color:var(--text-muted)}
.tk-pass-empty{margin:18px 0 0;padding:16px;border-radius:16px;background:var(--bg-sunken);text-align:center}
.tk-pass-empty p{margin:0 0 6px;font-size:14px;line-height:1.6;color:var(--text-body)}
.tk-pass-note{margin:16px 2px 4px;font-size:12px;line-height:1.5;color:var(--text-faint);text-align:center}
.tk-pass-foot{padding:10px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line-soft)}
.tk-used-stamp{margin:0;padding:6px 12px;border-radius:99px;background:var(--surface-brand-soft);font-size:14px;font-weight:var(--fw-semibold);color:var(--green-800)}

/* ---------- ขี้บอกสุขภาพ: วันนี้ไม่ได้ถ่าย · days in a row · last week · reminder (health.js) ---------- */
.hl-streak{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:10px 4px 0;font-size:14px;color:var(--text-muted)}
.hl-streak b{font-size:15px;color:var(--text-strong)}
.hl-streak.is-quiet{font-size:13px}
.hl-none-btn{display:block;margin:8px auto 0;padding:8px 14px;border:0;background:none;font:inherit;font-size:15px;
  font-weight:var(--fw-semibold);color:var(--green-700);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.hl-dot.is-skip{background:transparent;color:var(--text-muted);font-size:13px}
.hl-skip-key{font-style:normal;font-weight:800;color:var(--text-muted)}
.hl-weekly{padding:16px}
.hl-weekly-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.hl-weekly-nums span{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.hl-weekly-nums b{font-size:24px;line-height:1.1;font-weight:var(--fw-bold);color:var(--text-strong)}
.hl-weekly-nums em{font-style:normal;font-size:13px;color:var(--text-muted)}
.hl-weekly-nums small{font-size:12px;line-height:1.3;color:var(--text-muted)}
.hl-weekly-nums .is-ok b{color:var(--green-700)}
.hl-weekly-nums .is-hard b{color:var(--sun-600)}
.hl-weekly-nums .is-loose b{color:var(--sky-600)}
.hl-weekly-line{margin:10px 2px 0;font-size:14px;color:var(--text-body)}
.hl-weekly-line.is-flag{color:var(--coral-500);font-weight:var(--fw-semibold)}
.hl-time{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:12px 16px;border-radius:16px;
  background:var(--bg-sunken);font-size:16px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.hl-time input{font:inherit;font-size:20px;padding:6px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-card);color:var(--text-strong)}

/* "คนที่มาช่วยกัน" details (3.17.7) — reuses the "where from" popup layout */
.tk-src-sub{grid-column:2 / 4;font-size:13px;color:var(--text-muted)}
.tk-helpers-new{margin:12px 0 0;font-size:15px;color:var(--text-body)}
.tk-helpers-you{margin:14px 0 0;padding:12px 14px;border-radius:var(--radius-sm, 12px);background:var(--surface-brand-soft);color:var(--text-strong);font-size:15px}

/* ---------- sticker picker · QR sign (3.18) ---------- */
.tk-stickers .pin-modal-sheet{max-height:92vh;display:flex;flex-direction:column}
.tk-sticker-body{padding:0 20px 20px;overflow-y:auto}
.tk-sticker-qr{margin:0 0 4px;font-size:13px;font-weight:700;color:var(--text-link)}
.tk-sticker-banner{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:10px 12px;border-radius:14px;background:var(--surface-brand-soft)}
.tk-sticker-banner img{flex:0 0 auto;height:auto;max-width:104px}
.tk-sticker-banner p{margin:0;font-size:14px;color:var(--text-strong);line-height:1.5}
.tk-sticker-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 12px;padding:4px;border-radius:999px;background:var(--surface-sunken, rgba(20,38,26,.06))}
.tk-sticker-tab{min-height:40px;padding:0 4px;white-space:nowrap;border:0;border-radius:999px;background:transparent;font:inherit;font-size:15px;font-weight:600;color:var(--text-body);cursor:pointer}
.tk-sticker-tab.is-on{background:#fff;color:var(--text-strong);box-shadow:none}
.tk-sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tk-sticker{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:8px 2px;border:2px solid transparent;border-radius:14px;background:transparent;font:inherit;cursor:pointer}
.tk-sticker img{width:56px;height:56px}
.tk-sticker-label{font-size:12px;line-height:1.3;color:var(--text-body);text-align:center;overflow-wrap:anywhere}
.tk-sticker.is-mine{border-color:var(--green-400);background:var(--surface-brand-soft)}
.tk-sticker-count{position:absolute;top:4px;right:6px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#14261A;color:#fff;font-size:11px;line-height:20px}
/* head, banner, tabs and the QR button stay put; only the stickers scroll */
.tk-stickers .pin-modal-head{flex:none}
.tk-sticker-top{flex:none;padding:0 20px 12px;border-bottom:1px solid var(--line-soft)}
.tk-sticker-top .tk-sticker-tabs{margin:0}
.tk-sticker-note{text-align:center}
.tk-sticker-body{flex:1 1 auto;min-height:0;padding-top:12px;padding-bottom:12px}
.tk-sticker-foot{flex:none;padding:8px 20px 14px;border-top:1px solid var(--line-soft);background:var(--surface-card)}
.tk-sticker-foot .tk-link-btn{width:100%;justify-content:center}
.tk-sign-body{padding:0 20px 20px;overflow-y:auto}
.tk-sign .pin-modal-sheet{max-height:92vh;display:flex;flex-direction:column}
.tk-sign-preview{display:flex;justify-content:center;min-height:120px;margin-bottom:8px}
.tk-sign-preview img{max-width:100%;max-height:52vh;border-radius:10px;box-shadow:0 2px 12px rgba(20,38,26,.18)}
.tk-sign-rule{margin:10px 0 0;padding:10px 12px;border-radius:12px;background:#FFF6E0;font-size:13px;color:var(--text-strong)}
.tk-used-clean{margin:12px 0 0;font-size:13px;color:var(--text-muted)}
@media (min-width:420px){.tk-sticker-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.tk-sticker img{width:64px;height:64px}}
.tk-sticker-banner .tk-tips-link{display:block;min-height:0;margin-top:6px;padding:0;font-size:13px}

/* ---------- sticker alerts on pins · stickers flying to the pin (3.18.2) ---------- */
.tk-pin-alert{position:absolute;right:-4px;bottom:2px;width:18px;height:18px;border-radius:50%;background:#FF6B4A;color:#fff;
  border:2px solid #fff;font:800 12px/14px system-ui,sans-serif;text-align:center;box-shadow:0 1px 3px rgba(20,38,26,.35);pointer-events:none}
.tk-sticker-flight{position:fixed;width:56px;height:56px;z-index:10050;pointer-events:none}
.tk-pin-cling{position:fixed;width:34px;height:34px;z-index:10040;pointer-events:none;transform:rotate(var(--r,0deg));
  animation:tk-cling 2.6s ease both}
@keyframes tk-cling{0%{opacity:0;transform:rotate(var(--r,0deg)) scale(.4)}12%{opacity:1;transform:rotate(var(--r,0deg)) scale(1.15)}
  22%{transform:rotate(var(--r,0deg)) scale(1)}80%{opacity:1}100%{opacity:0;transform:rotate(calc(var(--r,0deg) + 20deg)) translateY(-10px) scale(.8)}}
@media (prefers-reduced-motion:reduce){.tk-pin-cling{animation:none}}

/* ---------- stickers stuck on a recommended toilet (3.18.3) ----------
   The card keeps its own layout exactly; the stickers sit on a layer above it, in spots that
   placeRecStickers() (app-shell.js) measured as empty: never over text, a chip, a button or the
   "เหมาะสุด" badge. They cluster and overlap each other, like stickers slapped on in a hurry. */
.tk-rec{position:relative}
.tk-rec-layer{position:absolute;inset:0;pointer-events:none;z-index:2}
.tk-rec-sticker{position:absolute;left:0;top:0;padding:0;border:0;background:none;cursor:pointer;pointer-events:auto;visibility:hidden;
  transform:rotate(var(--r,0deg));-webkit-tap-highlight-color:transparent}
.tk-rec-sticker.is-placed{visibility:visible;animation:tk-float var(--fd,3s) ease-in-out var(--fo,0s) infinite}
.tk-rec-sticker img{width:var(--sz,52px);height:var(--sz,52px);display:block}
.tk-rec-sticker.is-word .word-sticker{display:block;width:max-content;font-size:var(--fs,14px)}
.tk-rec-sticker b{position:absolute;right:-2px;bottom:-2px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#14261A;color:#fff;font-size:11px;line-height:18px;text-align:center}
.tk-rec-sticker:active{animation-play-state:paused;transform:rotate(calc(var(--r,0deg) * -1)) scale(1.12)}
@keyframes tk-float{
  0%,100%{transform:translateY(0) rotate(var(--r,0deg))}
  50%{transform:translateY(-3px) rotate(calc(var(--r,0deg) + 4deg))}}
@media (prefers-reduced-motion:reduce){.tk-rec-sticker.is-placed{animation:none}}

/* ---------- word stickers in the picker (3.18.3) ---------- */
.tk-sticker.is-word{justify-content:center;min-height:96px}
.tk-sticker-face{display:flex;align-items:center;justify-content:center;min-height:64px}
.tk-sticker-grid.is-words{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:14px}
/* "คำชม · อยู่ถาวร" / "คำบ่น · หายเองใน 14 วัน": a full-width heading over each kind of word */
.tk-sticker-sub{grid-column:1 / -1;margin:0;font-size:14px;font-weight:600;color:var(--text-body)}
.tk-sticker-sub:not(:first-child){margin-top:10px;padding-top:12px;border-top:1px solid var(--line-soft)}
.tk-sticker-face .word-sticker{transform:rotate(-3deg);max-width:100%;font-size:14px}
.tk-sticker.is-word:nth-of-type(even) .word-sticker{transform:rotate(3deg)}

/* ---------- alive (3.18.4): every tap answers, every sticker has a little life ----------
   Only transform and opacity move (the graphics card does that, nothing reflows); hovers only
   where there is a real mouse; and the reduce-motion rule above stills all of it. */
@media (hover:hover) and (pointer:fine){
  body.tk-app .btn:not(:disabled):not(.btn-emergency):hover{transform:translateY(-1px)}
  body.tk-app .btn:not(:disabled):not(.btn-emergency):active{transform:translateY(0) scale(.97)}
  body.tk-app .tk-rec:hover{transform:translateY(-2px);box-shadow:none}
  body.tk-app .tk-rec{transition:transform var(--dur-fast) var(--ease-pop),box-shadow var(--dur-base) var(--ease-standard)}
  body.tk-app .tk-quick-card:hover,body.tk-app .tk-game-chip:hover,body.tk-app .tk-place:hover{transform:translateY(-2px)}
  body.tk-app .tk-sticker:hover img,body.tk-app .tk-sticker:hover .tk-sticker-face{animation:tk-wiggle .5s ease-in-out}
  body.tk-app .sticker-slap:hover{animation:tk-wiggle .5s ease-in-out}
  body.tk-app .tk-rec-sticker:hover{animation-play-state:paused}
  body.tk-app .tk-rec-sticker:hover > *{transform:scale(1.12);transition:transform var(--dur-fast) var(--ease-pop)}
  body.tk-app .stat-block .sticker{transition:transform var(--dur-base) var(--ease-pop)}
  body.tk-app .stat-block:hover .sticker{transform:translateY(-3px) rotate(-6deg)}
  body.tk-app .sticker-add:hover{transform:rotate(-3deg) scale(1.05)}
}
/* the icon inside a button gives a small nod when pressed */
body.tk-app .btn img,body.tk-app .btn svg{transition:transform var(--dur-fast) var(--ease-pop)}
body.tk-app .btn:active img,body.tk-app .btn:active svg{transform:rotate(-8deg) scale(1.1)}
/* chips and filters squash a little under the finger */
body.tk-app .tag,body.tk-app .tk-mode,body.tk-app .tk-sticker-tab,body.tk-app .sticker-add{transition:transform var(--dur-fast) var(--ease-pop),background var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard)}
body.tk-app button.tag:active,body.tk-app a.tag:active,body.tk-app .tk-mode:active,body.tk-app .tk-sticker-tab:active,body.tk-app .sticker-add:active{transform:scale(.93)}
/* stickers in the picker: pressed → squish; stuck → stamped on */
body.tk-app .tk-sticker{transition:transform var(--dur-fast) var(--ease-pop),background var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard)}
body.tk-app .tk-sticker:active{transform:scale(.88) rotate(-4deg)}
body.tk-app .tk-sticker.is-mine img,body.tk-app .tk-sticker.is-mine .tk-sticker-face{animation:tk-stamp .42s var(--ease-pop)}
body.tk-app .tk-sticker-count.is-bump{animation:tk-bump .3s var(--ease-pop)}
/* stickers on a card wobble when tapped */
body.tk-app .sticker-slap:active{animation:tk-wiggle .35s ease-in-out}
@keyframes tk-wiggle{0%,100%{rotate:0deg}25%{rotate:-7deg}60%{rotate:6deg}}
@keyframes tk-stamp{0%{transform:scale(1.35) rotate(-8deg);opacity:.6}55%{transform:scale(.92) rotate(3deg);opacity:1}100%{transform:none}}

/* ---------- map card: only the head sits beside the icon (3.18.3) ----------
   The icon used to own a column the whole card down, so everything under the title was pushed
   right and the left side stayed empty. Now the icon stays beside the name, distance and badges,
   and everything after the head (where the data comes from, stickers, "ตอนนี้", buttons) uses the
   full width. Order and content are unchanged; the search list and the web page keep their layout. */
body.tk-app .full-map-sheet .toilet-card{display:grid;grid-template-columns:52px minmax(0,1fr);column-gap:16px;align-items:start}
body.tk-app .full-map-sheet .toilet-card .body{display:contents}
body.tk-app .full-map-sheet .toilet-card .thumb{grid-column:1;grid-row:1}
body.tk-app .full-map-sheet .toilet-card .card-head{grid-column:2;grid-row:1}
body.tk-app .full-map-sheet .toilet-card .body > :not(.card-head){grid-column:1 / -1}
/* the lower rows of the head (where it is, the facts, cleanliness) go full width too, so a place
   with lots of detail does not leave a tall empty strip under the icon */
body.tk-app .full-map-sheet .card-head .where-row,
body.tk-app .full-map-sheet .card-head .facts-row,
body.tk-app .full-map-sheet .card-head .card-clean-row{margin-left:-68px}
body.tk-app .full-map-sheet .card-head .title-row{min-height:26px}
/* the head sticks while the card scrolls: its background now reaches under the icon too, so
   nothing shows through on the left; the icon stays on top of it */
body.tk-app .full-map-sheet .card-head::before{content:"";position:absolute;top:0;bottom:0;left:-68px;right:0;background:var(--surface-card);z-index:-1}
body.tk-app .full-map-sheet .toilet-card .thumb{z-index:3}
/* computer: the card stops below the filter chips, however many rows they wrap to (measured in
   app-shell.js; 176px is the fallback for one row) */
@media (min-width:900px){
  body.tk-app .full-map-sheet{max-height:calc(100% - var(--tk-filters-bottom, 176px) - 24px)}
}

/* facility chips in a card's detail (3.18.3): fill only, no outline — with 13 of them the green
   strokes made the panel look crowded. Every state keeps its own fill so they still read apart. */
body.tk-app .facility-chip.evidence,
html[data-tk-theme="dark"] body.tk-app .facility-chip.evidence{border-color:transparent}
body.tk-app .facility-chip.evidence.is-yes{background:var(--green-100)}

/* ---------- map card spacing (3.18.3) ----------
   One rhythm for the whole card: 4–8px between the lines of the head, 12–14px between sections,
   and the facility chips on a real two-column grid of equal cells instead of a ragged wrap.
   (The card kept the flex `gap:16px` from styles.css, which as a grid became 16px between every
   section on top of their margins: the uneven holes in the card.) */
body.tk-app .full-map-sheet .toilet-card{row-gap:0}
body.tk-app .full-map-sheet .toilet-card .title-row{margin-bottom:4px}
body.tk-app .full-map-sheet .toilet-card .meta-row{margin:4px 0 8px}
body.tk-app .full-map-sheet .card-head .where-row{margin:0 0 6px -68px}
body.tk-app .full-map-sheet .card-head .card-clean-row{margin:8px 0 0 -68px}
body.tk-app .full-map-sheet .card-head .card-clean-row .card-clean{margin:0}
body.tk-app .full-map-sheet .toilet-card .card-provenance{margin-top:14px}
body.tk-app .full-map-sheet .toilet-card .sticker-board{margin-top:12px}
body.tk-app .full-map-sheet .toilet-card .card-detail{margin-top:14px;padding-top:14px}
body.tk-app .full-map-sheet .toilet-card .card-detail-scroll{gap:12px}
body.tk-app .full-map-sheet .toilet-card .card-detail .chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:8px}
body.tk-app .full-map-sheet .toilet-card .card-detail .facility-chip{width:100%;min-width:0;border-radius:16px}
body.tk-app .full-map-sheet .toilet-card .card-detail .facility-chip span{min-width:0}
body.tk-app .full-map-sheet .toilet-card .tk-card-community{margin-top:14px;padding-top:14px}
body.tk-app .full-map-sheet .toilet-card .card-actions{margin-top:14px}

/* ---------- map card: scan it in three or four looks (3.18.3) ----------
   head → stickers → a grid of facilities → a grid of the practical facts. The facts used to be a
   long list hugging the left edge; now they are tiles on the same two columns as the chips. */
body.tk-app .facility-chip.evidence.is-yes{background:var(--green-50)}
body.tk-app .full-map-sheet .card-detail .loc-list{margin:0;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:8px}
body.tk-app .full-map-sheet .card-detail .loc-list li{display:flex;flex-direction:column;gap:2px;padding:8px 11px;border-radius:14px;background:var(--bg-page);font-size:14px;font-weight:var(--fw-semibold);color:var(--text-strong)}
body.tk-app .full-map-sheet .card-detail .loc-list .loc-key{flex:none;font-size:12px;font-weight:var(--fw-medium);color:var(--text-muted)}
body.tk-app .full-map-sheet .card-detail .loc-list li > span:last-child{font-weight:var(--fw-semibold)}
body.tk-app .full-map-sheet .card-detail .loc-list small{font-weight:var(--fw-regular);margin-top:1px}
body.tk-app .tk-vote-hint{text-align:center}

/* sticker picker on a computer: a 4:5 portrait card, 4 to a row so each set of 16 fills even rows
   (phones keep the tall sheet) */
@media (min-width:900px){
  body.tk-app .tk-stickers .pin-modal-sheet{
    --h:min(720px, calc(100vh - 96px));
    height:var(--h);width:calc(var(--h) * .8);max-width:none;max-height:none;
  }
  body.tk-app .tk-stickers .tk-sticker-grid,
  body.tk-app .tk-stickers .tk-sticker-grid.is-words{grid-template-columns:repeat(4,minmax(0,1fr))}
  body.tk-app .tk-stickers .tk-sticker-banner{gap:16px;padding:12px 16px}
  body.tk-app .tk-stickers .tk-sticker-banner img{max-width:120px}
  body.tk-app .tk-stickers .tk-sticker-banner p{font-size:17px;line-height:1.55}
  body.tk-app .tk-stickers .tk-sticker-banner .tk-tips-link{font-size:15px}
}

/* sticker window on a phone: the text column beside the mascot is narrow, so the mascot is smaller,
   the words are a size smaller, and lines are balanced (no lone word on the last line) in every language */
@media (max-width:899px){
  body.tk-app .tk-stickers .tk-sticker-banner{gap:10px;padding:10px 12px}
  body.tk-app .tk-stickers .tk-sticker-banner img{max-width:72px}
  body.tk-app .tk-stickers .tk-sticker-banner p{font-size:13px;line-height:1.45}
  body.tk-app .tk-stickers .tk-sticker-banner .tk-tips-link{font-size:12.5px;margin-top:4px}
  body.tk-app .tk-stickers .tk-sticker-label{font-size:11px;line-height:1.25}
  body.tk-app .tk-stickers .tk-sticker-note{font-size:12.5px;line-height:1.5}
}
body.tk-app .tk-stickers .tk-sticker-banner p,body.tk-app .tk-stickers .tk-sticker-label,
body.tk-app .tk-stickers .tk-sticker-note,body.tk-app .tk-stickers .tk-sticker-sub{text-wrap:balance}
body.tk-app .tk-stickers .tk-sticker-label{overflow-wrap:normal}
/* Chinese has no spaces: keep each name whole and split only at the break point the translation gives
   (a hidden U+200B), or at punctuation in the tips; anywhere is the last resort so nothing spills */
html[data-tk-lang="zh"] body.tk-app .tk-stickers .tk-sticker-label,
html[data-tk-lang="zh"] body.tk-app .tk-stickers .tk-sticker-banner p{word-break:keep-all;overflow-wrap:anywhere}
/* Thai tips break at their space ("…ถ้ามีป้ายบอก / ท่อห้องน้ำ…"); Thai sticker names at the split in TH_BREAK */
.tk-lb{display:inline-block;max-width:100%}
@media (max-width:899px){
  body.tk-app .tk-stickers .tk-sticker-tab{font-size:14px;padding:0 2px}
}

/* map card: ดูรายละเอียด · เข็มทิศ · นำทาง stay at the bottom of the card while it scrolls (3.18.4).
   With stickers on the card, a phone pushed them below the fold and cut "นำทาง" in half. */
body.tk-app .full-map-sheet .toilet-card .card-actions{
  position:sticky;bottom:0;z-index:2;
  margin-top:14px;padding:10px 0 2px;
  background:var(--surface-card);box-shadow:0 -1px 0 var(--line-soft);
}

/* "ไม่ไหวแล้ว" result (3.18.4): the found line centred; under the name the cleanliness stars (the same
   ones that colour the pin); then the four things that matter in a hurry, each มี / ไม่มี / ? */
body.tk-app .emergency-found{text-align:center}
.em-clean{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:4px 0 2px;font-size:13px;color:var(--text-body)}
.em-clean .stars{display:inline-flex}
.em-clean-none{color:var(--text-muted)}
.em-have{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px}
.em-have-item{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 2px 7px;border-radius:12px;
  background:var(--bg-page);font-size:12px;font-weight:var(--fw-semibold);color:var(--text-muted);text-align:center;line-height:1.2}
.em-have-item img{width:22px;height:22px}
.em-have-item.is-yes{background:var(--green-50);color:var(--green-800)}
.em-have-item.is-no{opacity:.55}
.em-have-item.is-no span{text-decoration:line-through}
.em-have-item.is-unknown img{opacity:.45;filter:grayscale(1)}
.em-have-item b{position:absolute;top:4px;right:6px;font-size:11px;color:var(--text-muted)}
/* 3.18.6 · the SOS card says when a toilet charges, next to what it has */
.em-fee{display:flex;align-items:center;gap:10px;margin-top:8px;padding:8px 12px;border-radius:12px;
  background:var(--sun-100);border:1px solid #F3D98A;color:#6B4B00;font-size:13px;line-height:1.35;text-align:left}
.em-fee b{flex:none;font-size:15px}
/* 🚗 ขอติดรถไปขี้ */
.tk-ride-head{align-items:center}
.tk-ride-head h3{margin:0;font-size:20px}
.tk-ride-body{display:flex;flex-direction:column;gap:12px}
/* the trip card: you → the toilet */
.tk-ride-trip{position:relative;margin-top:6px;display:flex;flex-direction:column;gap:14px;padding:14px 16px;border-radius:18px;
  background:linear-gradient(135deg,var(--green-50),var(--surface-card) 70%);border:1px solid var(--green-100)}
.tk-ride-trip::before{content:"";position:absolute;left:27px;top:30px;bottom:34px;border-left:2px dashed var(--green-300)}
.tk-ride-stop{position:relative;display:flex;align-items:center;gap:12px;min-width:0}
.tk-ride-dot{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%}
.tk-ride-dot.is-me{background:#fff;box-shadow:inset 0 0 0 6px var(--sky-400),0 0 0 4px rgba(76,195,232,.18)}
.tk-ride-dot.is-to{background:var(--green-400);font-size:13px;box-shadow:0 0 0 4px rgba(126,217,87,.25)}
.tk-ride-where{flex:1;min-width:0;display:flex;flex-direction:column;font-size:13px;color:var(--text-muted)}
.tk-ride-where b{font-size:16px;font-weight:var(--fw-bold);color:var(--text-strong);line-height:1.3;overflow-wrap:anywhere}
.tk-ride-where small{font-size:12px;color:var(--text-muted)}
.tk-ride-km{flex:none;padding:4px 10px;border-radius:999px;background:var(--surface-ink);color:#fff;font-size:12px;font-weight:var(--fw-semibold);white-space:nowrap}
/* the two ways */
.tk-ride-opt{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:18px;background:var(--surface-card);box-shadow:var(--shadow-card);border:1px solid var(--line-soft)}
.tk-ride-opt-head{display:flex;align-items:center;gap:12px}
.tk-ride-ico{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:14px;font-size:22px}
.is-friend .tk-ride-ico{background:var(--green-100)}
.is-self .tk-ride-ico{background:var(--sun-100)}
.tk-ride-title{margin:0;font-size:16px;font-weight:var(--fw-bold);color:var(--text-strong);line-height:1.3}
.tk-ride-note{margin:2px 0 0;font-size:13px;line-height:1.45;color:var(--text-muted)}
.tk-ride-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.tk-ride-row>.btn,.tk-ride-copy,.tk-ride-apps>.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0}
.tk-ride-row svg,.tk-ride-copy svg{flex:none;width:20px;height:20px}
.tk-ride-row>.btn{min-width:0;padding-inline:14px}
.tk-ride-more{width:auto}
.tk-ride-apps{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tk-ride-privacy{margin:0;text-align:center;font-size:12px;line-height:1.45;color:var(--text-faint)}
/* review form (3.18.8): photos line up with the other blocks — no divider, three equal slots */
#reviewModal .tk-attach{margin:0;padding:0;border:0}
#reviewModal .tk-attach-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#reviewModal .tk-attach-item,#reviewModal .tk-attach-add{width:100%;height:auto;aspect-ratio:4/3}
#reviewModal .tk-attach-note{text-align:left}
/* no photo yet: the add button is one full-width bar instead of a lone square */
#reviewModal .tk-attach-add:only-child{grid-column:1/-1;aspect-ratio:auto;height:56px;flex-direction:row;gap:8px}
/* map card: keep the name clear of the card's top edge, also once the card scrolls under its sticky head */
body.tk-app .full-map-sheet{padding-top:18px}
body.tk-app .full-map-sheet .card-head{padding-top:2px}
body.tk-app .full-map-sheet .toilet-card .thumb{top:2px}
body.tk-app .full-map-sheet-close{top:12px;right:12px}
/* home: the line under ไม่ไหวแล้ว touched the compass card below it */
.tk-home-note{margin-bottom:14px}
/* stickers: the place name sat right on the banner under it */
.tk-stickers .tk-checkin-sub{margin-bottom:12px}
/* home: เข็มทิศ · โหมดเดิน gets a flat tile in the same shape as the ♥ card's */
.tk-walk-emoji.tk-walk-flat{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:52px;height:52px;border-radius:16px;background:var(--green-100);color:var(--green-600);font-size:0}
.tk-walk-flat svg{width:36px;height:36px}
/* "เข็มทิศใช้ได้บนมือถือเท่านั้น" (computer): flat tile, a QR to carry it to the phone, centred */
.tk-cx-tile{margin:0 auto 10px}
.tk-cx-desk-body{text-align:center}
.tk-cx-qr{display:flex;align-items:center;gap:16px;padding:14px;border-radius:16px;background:var(--tk-fill,#EFF2ED);text-align:left}
.tk-cx-qr-img{flex:none;width:116px;height:116px;padding:8px;box-sizing:border-box;background:#fff;border-radius:12px}
.tk-cx-qr-img svg{display:block;width:100%;height:100%}
.tk-cx-qr.no-qr .tk-cx-qr-img{display:none}
.tk-cx-qr-text{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:14px;line-height:1.5;color:var(--text-body)}
.tk-cx-qr-text>b{font-size:16px;color:var(--text-strong)}
.tk-cx-qr-text span b{color:var(--text-strong);overflow-wrap:anywhere}
.tk-cx-desk-body .tk-cx-why{margin:12px 0 0;font-size:13px;line-height:1.55;color:var(--text-muted)}
/* footers that stack their buttons: the shared "spread across" rule must not squash them */
.pin-modal .pin-modal-foot:is(.tk-cx-desk-foot,.tk-premium-foot)>.btn{flex:none;width:100%}

/* ของน่าพก home card (closed on the live site, see GEAR_OPEN in script.js) */
a.tk-gear-card{text-decoration:none;color:inherit}
.tk-gear-card+.tk-donate-card{margin-top:12px}
.tk-gear-tile{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:52px;height:52px;border-radius:16px;background:#FFE9D6;color:#FF7A1A}
.tk-gear-tile svg{width:28px;height:28px}
.tk-row-basket{display:flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;color:#FF7A1A}   /* bare icon, like the other rows */
.tk-row-basket svg{width:30px;height:30px}
html[data-tk-theme="dark"] .tk-gear-tile{background:rgba(255,122,26,.18)}

/* ของน่าพก while locked on the live site: a quiet "เร็ว ๆ นี้" pill, nothing to tap */
.tk-soon{flex:0 0 auto;margin-left:auto;align-self:center;padding:4px 11px;border-radius:999px;background:var(--sun-100,#FFF3D1);color:#7A5200;
  font-size:12.5px;font-weight:700;line-height:1.3;white-space:nowrap}
html[data-tk-theme="dark"] .tk-soon{background:rgba(255,197,61,.16);color:#F5D27A}
.tk-gear-card.is-soon,.tk-row.is-soon{cursor:default}
@media (hover:hover){.tk-gear-card.is-soon:hover{transform:none}}

/* ===================== redesign 2026-11-15: profile · install · how-it-works =====================
   Owner: "ออกแบบใหม่ให้สวยขึ้น". Same rules as the rest of the app: no outlines, no shadows, things
   stand apart by fill; heads centred; groups of numbers sit in an even grid. */
/* the last small outlines: cards, stat blocks, chips and the leaderboard rows */
:is(.card,.stat-block,.hall-row,.hall-card,.hall-empty,.hall-mine-card,.badge,.hall-badge,.rank-badge){border-color:transparent}

/* โปรไฟล์สมาชิก */
#profileModal .profile-head{flex-direction:column;align-items:center;gap:6px;padding:2px 0 4px;text-align:center}
.hall-avatar.xl{width:84px;height:84px;margin-bottom:4px;font-size:34px;font-weight:var(--fw-bold)}
#profileModal .profile-name{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;font-size:21px;font-weight:var(--fw-bold);line-height:1.3}
#profileModal .profile-rank{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin-top:2px}
.pf-pill{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:999px;background:var(--tk-fill);
  font-size:13px;font-weight:var(--fw-semibold);color:var(--text-body);white-space:nowrap}
.pf-pill.is-rank{background:#FFF1C9;color:#7A5200}
html[data-tk-theme="dark"] .pf-pill.is-rank{background:rgba(255,197,61,.16);color:#F5D27A}
#profileModal .profile-badges{justify-content:center;margin-top:8px}
.hall-badge{background:var(--green-50)}
#profileModal .profile-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}
#profileModal .profile-stats .pf-stat{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:14px 14px 13px;
  border:0;border-radius:20px;background:var(--tk-fill);box-shadow:none}
.pf-stat img{width:34px;height:34px;margin-bottom:8px}
#profileModal .pf-stat .pf-each{position:absolute;top:12px;right:12px;padding:2px 8px;border-radius:999px;background:var(--surface-card);
  font-size:12px;font-weight:var(--fw-bold);color:var(--green-700)}
#profileModal .pf-stat strong{font-size:26px;line-height:1.15}
#profileModal .pf-stat .pf-label{margin-top:2px;font-size:13.5px;font-weight:var(--fw-semibold);color:var(--text-body)}
#profileModal .pf-stat .pf-pts{font-size:12px;color:var(--text-muted)}
.pf-note{margin:8px 0 0;text-align:center;font-size:12px;color:var(--text-faint)}
#profileModal .name-editor{margin:18px 0 0;padding:16px;border:0;border-radius:20px;background:#F1F9EC}
html[data-tk-theme="dark"] #profileModal .name-editor{background:rgba(126,217,87,.10)}
#profileModal .name-editor .pin-field>span{font-size:15px;font-weight:var(--fw-bold);color:var(--text-strong)}
#profileModal .name-editor .pin-subfield{margin:2px 0 0}
.name-editor-row{display:flex;gap:8px;margin-top:12px}
#profileModal #profileNameInput{flex:1 1 auto;min-width:0;height:48px;padding:0 16px;border:0;border-radius:14px;background-color:#FFFFFF!important;
  font:var(--fw-regular) 16px/1.4 var(--font-core);color:var(--text-strong)}
html[data-tk-theme="dark"] #profileModal #profileNameInput{background-color:var(--surface-card)!important}
#profileModal #profileNameInput::placeholder{color:var(--text-faint)}
.name-editor-row .btn{flex:none;height:48px;padding:0 20px}
#profileModal #profileNameStatus{display:block;margin:8px 0 0;font-size:12.5px}
#profileModal #profileNameStatus:empty{display:none}
#profileModal .contrib-history{margin-top:16px;padding:16px;border:0;border-radius:20px;background:var(--tk-fill)}
#profileModal .contrib-history h4{font-size:15px}
#profileModal .contrib-history .meta{margin:0;font-size:13.5px;line-height:1.6;color:var(--text-muted)}
#profileModal .contrib-history li{padding:10px 12px;border-radius:14px;background:var(--surface-card)}

/* ติดตั้งแอป */
.inst-hero{display:flex;flex-direction:column;align-items:center;gap:12px;margin:0 0 16px;text-align:center}
.inst-app{width:72px;height:72px;border-radius:18px}
.inst-hero p{margin:0;max-width:420px;font-size:14.5px;line-height:1.65;color:var(--text-body)}
#installModal .install-guide{margin:0;padding:16px 16px 14px;border:0;border-radius:20px;background:var(--tk-fill)}
#installModal .install-guide h4{margin:0 0 12px;font-size:15px}
#installModal .install-guide ol{display:grid;gap:10px;margin:0;padding:0;list-style:none}
#installModal .install-guide li{display:flex;align-items:flex-start;gap:12px;margin:0;font-size:14.5px;line-height:1.6}
.inst-n{display:grid;place-items:center;flex:none;width:28px;height:28px;margin-top:-1px;border-radius:50%;background:var(--green-400);
  color:var(--green-900);font-size:14px;font-weight:var(--fw-bold)}
#installModal .install-note{display:flex;align-items:flex-start;gap:10px;margin:12px 0 0;padding:12px 14px;border:0;border-radius:16px;
  background:#FFF4D6;color:#6B4B00;font-size:13.5px;line-height:1.6}
html[data-tk-theme="dark"] #installModal .install-note{background:rgba(255,197,61,.14);color:#F5D27A}
#installModal .install-foot{display:flex;align-items:flex-start;gap:10px;margin:12px 0 0;padding:0 4px;font-size:13px;line-height:1.6;color:var(--text-muted)}
:is(#installModal .install-note,#installModal .install-foot) img{flex:none;margin-top:1px}

/* ทำงานยังไง (and the long home page it shares): the city skyline is a footer to each section,
   so content ends above it instead of sitting on top of the houses */
.has-city:has(> .city-layer--band){padding-bottom:calc(var(--section-y) + var(--city-band-h) * .5)}
body.tk-app .has-city:has(> .city-layer--band){padding-bottom:calc(28px + var(--city-band-h) * .5)}

/* ===================== redesign 2026-11-15: compass + AR =====================
   Compass: a flat dial (tick ring, N E S W, a two-tone arrow with no outline or shadow), the place
   as a pill with a pin, toggles as filled pills. The coloured ring that says how far you are
   (red → orange → yellow → green) stays exactly as it was. */
.tk-cxs{--cx-arrow-a:#8BDD62;--cx-arrow-b:#4FA82B;--cx-tick:color-mix(in srgb,var(--text-faint) 45%,transparent)}
.tk-cx-top{position:relative;justify-content:center;min-height:64px}
.tk-cx-back{position:absolute;left:16px;top:12px;border:0;box-shadow:none}
.tk-cx-mode{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-radius:999px;background:var(--surface-card);
  color:var(--text-strong);font-size:14px}
.tk-cx-mode .tk-emo,.tk-cx-mode svg{width:20px;height:20px;vertical-align:0}
.tk-cx-name{display:inline-flex;align-items:center;gap:8px;max-width:min(420px,100%);margin:0 0 4px;padding:8px 18px 8px 10px;border-radius:22px;
  background:var(--surface-card);font-size:17px;line-height:1.35;text-align:left}
.tk-cx-name::before{content:"";flex:none;width:26px;height:26px;background:url(../assets/icons/v3/theekhee-location-pin.png) center/contain no-repeat}
.tk-cx-name:empty{display:none}
/* the dial gives way on short screens so the buttons below never ride over the words */
.tk-cx-dial{flex:none;width:min(74vw,310px,max(170px,calc(100dvh - 600px)));margin:14px 0 18px;box-shadow:inset 0 0 0 10px var(--tk-fill)}
.tk-cx-main{gap:4px;padding-top:4px;padding-bottom:4px}
.tk-cx-alert{margin-top:8px}
.tk-cx-alert:not([hidden]) ~ .tk-cx-hint,.tk-cx-hint:has(~ .tk-cx-alert:not([hidden])){display:none}
.tk-cx-rose::before{content:"";position:absolute;inset:16px;border-radius:50%;
  background:repeating-conic-gradient(from -1deg,var(--cx-tick) 0 2deg,transparent 2deg 30deg);
  -webkit-mask:radial-gradient(circle,transparent calc(70.7% - 10px),#000 calc(70.7% - 9px));
          mask:radial-gradient(circle,transparent calc(70.7% - 10px),#000 calc(70.7% - 9px))}
.tk-cx-n,.tk-cx-c{position:absolute;font-size:14px;font-weight:800;line-height:1}
.tk-cx-n{top:34px;font-size:16px}
.tk-cx-c{color:var(--text-faint)}
.tk-cx-c.is-e{right:34px;top:50%;transform:translateY(-50%)}
.tk-cx-c.is-s{bottom:34px;left:50%;transform:translateX(-50%)}
.tk-cx-c.is-w{left:34px;top:50%;transform:translateY(-50%)}
.tk-cx-arrow{inset:22%;width:56%;height:56%;filter:none}
.tk-cxs.is-near .tk-cx-dial{box-shadow:inset 0 0 0 10px var(--green-300,#9CE27C)}
.tk-cxs[data-band] .tk-cx-dial{box-shadow:inset 0 0 0 10px color-mix(in srgb, var(--cx-wave) 55%, transparent)}
.tk-cxs[data-band="here"] .tk-cx-dial{box-shadow:inset 0 0 0 12px var(--cx-wave),0 0 0 6px color-mix(in srgb, var(--cx-wave) 30%, transparent)}
.tk-cx-dist{font-size:52px;letter-spacing:-.02em}
.tk-cx-sub{font-size:16px;font-weight:600;color:var(--text-body)}
.tk-cx-hint{max-width:330px;font-size:13.5px}
.tk-cx-toggles{gap:8px}
.tk-cx-toggle{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px 0 12px;border:0;background:var(--surface-card)}
.tk-cx-toggle .tk-emo{width:22px;height:22px;vertical-align:0}
.tk-cx-toggle[aria-pressed="true"]{background:var(--green-100);color:var(--green-900)}
html[data-tk-theme="dark"] .tk-cx-toggle[aria-pressed="true"]{background:rgba(126,217,87,.22);color:#DDF5CF}
.tk-cx-actions .btn .tk-emo{width:24px;height:24px;vertical-align:-.3em}

/* AR: the bottom panel is a floating frosted card, the top is a frosted back button and a title
   pill, the toggle has no outline; the label you are heading to is solid green without a ring */
.tk-ar-top{justify-content:space-between;background:none}
.tk-ar-back,.tk-ar-title{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.tk-ar-back{background:rgba(15,26,19,.55);color:#fff}
.tk-ar-title{flex:0 1 auto;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px 0 12px;border-radius:999px;
  background:rgba(15,26,19,.55);text-shadow:none}
.tk-ar-title .tk-emo{width:22px;height:22px;vertical-align:0}
.tk-ar-acc{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.tk-ar-panel{left:12px;right:12px;bottom:calc(env(safe-area-inset-bottom) + 12px);max-width:480px;margin:0 auto;padding:16px 16px 14px;
  border-radius:28px;background:rgba(15,26,19,.66);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.tk-ar-name{display:flex;align-items:center;justify-content:center;gap:6px}
.tk-ar-name::before{content:"";flex:none;width:22px;height:22px;background:url(../assets/icons/v3/theekhee-location-pin.png) center/contain no-repeat}
.tk-ar-name:empty{display:none}
.tk-ar-dist{font-size:40px}
.tk-ar-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:0;background:rgba(255,255,255,.14)}
.tk-ar-toggle .tk-emo{width:22px;height:22px;vertical-align:0}
.tk-ar-toggle[aria-pressed="true"]{background:var(--green-400,#76d344);color:var(--green-900,#14361d)}
.tk-ar-buttons .btn{min-height:44px;box-shadow:none}
.tk-ar-buttons .btn-secondary{background:rgba(255,255,255,.92);color:var(--text-strong,#14261a)}
.tk-ar-hint{top:calc(env(safe-area-inset-top) + 66px);bottom:auto;padding:10px 14px;border-radius:16px;background:rgba(15,26,19,.6);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);text-shadow:none}
.tk-ar-label{box-shadow:0 4px 14px rgba(0,0,0,.22)}
.tk-ar-label.is-target{box-shadow:0 6px 18px rgba(0,0,0,.3)}
.tk-ar-flat-arrow{filter:none}
.tk-ar-edge{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);background:rgba(15,26,19,.66)}
/* FAQ: an even 2 × 2 grid (3 + 1 looked lopsided), each question led by the ? icon */
@media (min-width:720px){#faq .grid-auto-wide{grid-template-columns:repeat(2,minmax(0,1fr))}}
#faq .card{border-radius:22px;padding:20px 22px}
#faq .card>div:first-child{display:flex;align-items:center;gap:10px}
#faq .card>div:first-child::before{content:"";flex:none;width:28px;height:28px;background:url(../assets/icons/v3/theekhee-e-question.png) center/contain no-repeat}

/* map pins are flat (owner's SVG set, 11-15): no blur shadow on any pin or pin badge. A 14px
   drop-shadow filter on every one of 140–290 pins had to be redrawn on every zoom and every
   new pin, which is what made the map stutter on phones. The badges keep their plain white disc. */
.theekhee-marker,.tk-fuel-marker{filter:none}
.tk-pin-badge{box-shadow:none}
.tk-pin-badge.is-up{filter:none}
.phone-map .pin,.pin-crosshair{filter:none}

/* ===================== map top (owner 11-15) =====================
   Search and the ตัวกรอง button share one row; every other filter is inside ตัวกรอง (the status
   chips stay in the page, hidden, and the sheet presses them). The map credit, the "แสดง N จุด"
   note and the zoom hint stack in the top-right corner as small one-line notes. */
.tk-status-chips{display:none!important}
body.tk-app .tk-search-row{flex-wrap:nowrap;overflow:visible;margin:0;padding:0;-webkit-mask-image:none;mask-image:none}
.tk-search-row .full-map-search{flex:1 1 auto;min-width:0;max-width:none;box-shadow:var(--shadow-map)}
.tk-search-row .full-map-facilities{flex:none;display:flex;overflow:visible;padding:0}
.tk-search-row .tag-filters{height:44px!important;padding:0 16px!important;border-radius:999px;background:var(--surface-card)!important;
  box-shadow:var(--shadow-map)!important;font-size:14px!important;white-space:nowrap}
.tk-search-row .tag-filters.is-selected{background:var(--green-100)!important;color:var(--green-900)}
html[data-tk-theme="dark"] .tk-search-row .tag-filters.is-selected{background:rgba(126,217,87,.22)!important;color:#DDF5CF}
@media (min-width:640px){.tk-search-row{max-width:min(520px,60vw)}}
.leaflet-top.leaflet-right :is(.map-cap-note,.tk-fuel-zoom-note){display:none}
#fullMap .leaflet-top.leaflet-right :is(.map-cap-note,.tk-fuel-zoom-note):not([hidden]){display:block}
#fullMap .leaflet-top.leaflet-right :is(.map-cap-note,.tk-fuel-zoom-note){position:static;float:right;clear:both;transform:none;
  max-width:min(300px,calc(100vw - 24px));margin:6px 10px 0 0;padding:5px 12px;border:0;border-radius:999px;
  background:var(--surface-card);box-shadow:var(--shadow-map);color:var(--text-muted);font-size:12px;line-height:1.45;
  white-space:normal;text-align:right;pointer-events:none}
#fullMap .leaflet-control-attribution{margin:0 10px 0 0!important;border-radius:999px!important;padding:2px 10px!important}
/* filter sheet: the "แสดง" list is pick-one, drawn like the tick list */
.filter-modal .filter-check input[type=radio]{accent-color:var(--green-600)}

/* ===================== word stickers, flat (owner 11-15: "แก้ไขสติ๊กเกอร์หมวดคำพูด") =====================
   Same words, colours and five looks, drawn the way the new icon set is: solid fills only. Gone:
   the outlined shout text and its offset shadow, the gradients (holo, chrome, sunset), the ✦
   sparkles, the stacked box's outline and the white die-cut edge (four drop-shadow filters on
   every sticker, which also cost a redraw each). The picker grid is tighter and even. */
.word-sticker{filter:none}
.tk-pin-cling.word-sticker{filter:drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)}
.wt-holo{--bg:#C9B8FF;--tail:#C9B8FF}
.wt-chrome{--bg:#DDE3EC;--tail:#DDE3EC}
.wt-sunset{--bg:#FF6A3D;--tail:#FF6A3D}
.word-sticker .ws-body::before,.word-sticker .ws-a::before{content:none!important}
.wl-shout .ws-body{padding:.3em .65em .4em;border-radius:.45em;background:var(--bg);color:var(--ink1);-webkit-text-stroke:0;text-shadow:none;line-height:1.1}
.wl-shout.wz-xs .ws-body{font-size:1.6em}
.wl-shout.wz-s .ws-body{font-size:1.4em}
.wl-shout.wz-m .ws-body{font-size:1.25em}
.wl-shout.wz-l .ws-body,.wl-shout.wz-xl .ws-body{font-size:1.08em}
.wl-stack .ws-b{border:0;background:color-mix(in srgb,var(--c1) 16%,#fff)}
.wl-stack .ws-b::after{border:0;background:var(--c1)}
.tk-sticker-grid.is-words{row-gap:4px;column-gap:6px;align-items:center}
.tk-sticker.is-word{min-height:78px;padding:6px 2px}
.tk-sticker.is-word .tk-sticker-face{min-height:60px}
.tk-sticker-grid.is-words .tk-sticker-sub:not(:first-child){margin-top:12px;padding-top:0;border-top:0}
/* Hall of Fame "คุณอยู่อันดับ" card: the round rank sat top-left (a generic span rule made it a column) */
.hall-mine-card .hall-mine-rank{display:grid;place-items:center;font-size:15px;color:var(--green-900)}

/* ===================== animal avatars (owner 11-15) ===================== */
:is(.hall-avatar,.review-item .avatar){overflow:hidden}
:is(.hall-avatar,.review-item .avatar) .av-img{display:block;width:100%;height:100%;object-fit:contain}
.av-picker{margin-top:16px;padding:16px;border-radius:20px;background:var(--tk-fill)}
.av-picker-title{margin:0 0 10px;font-size:15px;font-weight:var(--fw-bold);color:var(--text-strong)}
.av-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px}
.av-pick{display:grid;place-items:center;aspect-ratio:1;padding:4px;border:0;border-radius:50%;background:var(--surface-card);cursor:pointer;
  transition:transform .12s ease,background-color .15s ease}
.av-pick img{display:block;width:100%;height:100%;object-fit:contain}
.av-pick:active{transform:scale(.92)}
.av-pick.is-on{background:var(--green-400);box-shadow:inset 0 0 0 3px var(--green-400)}
.av-picker-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px}
.av-picker-head .av-picker-title{margin:0}
.av-none{height:32px;padding:0 14px;border:0;border-radius:999px;background:var(--surface-card);font:inherit;font-size:13px;font-weight:var(--fw-semibold);color:var(--text-muted);cursor:pointer}
.av-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (min-width:560px){.av-grid{grid-template-columns:repeat(8,minmax(0,1fr))}}
.av-picker .pin-subfield{margin:10px 0 0}
/* filter sheet rows: filled, no outline (owner: no small strokes); "แสดง" as a 2-column grid */
.filter-check{border-color:transparent!important;background:var(--tk-fill)}
.filter-check.is-on,.filter-check:has(input:checked){background:var(--green-100);border-color:transparent!important}
html[data-tk-theme="dark"] .filter-check.is-on,html[data-tk-theme="dark"] .filter-check:has(input:checked){background:rgba(126,217,87,.2)}
.filter-list.filter-show{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.filter-show .filter-check{gap:8px;padding:6px 10px;min-height:46px}
.filter-show .filter-check input{display:none}
/* "ไม่ไหวแล้ว" result: the place card and the distance / updated boxes lose their thin outlines too */
.em-card{border-color:transparent}
.em-fact{border-color:transparent;background:var(--tk-fill)}
.card-clean-hint{min-width:0;font-size:13px;color:var(--text-muted)}
/* computer: the home title on one line (owner 11-16); phones keep the two lines */
@media (min-width:1024px){
  body.tk-app .tk-title-br{display:none}
  body.tk-app .tk-home-title{font-size:clamp(40px,4.4vw,54px);line-height:1.3;white-space:nowrap}
  html[data-tk-lang="en"] body.tk-app .tk-home-title{font-size:44px}
}
/* map card (2026-11-16): name, badges and distance sit beside the icon in .card-top; the rows that
   run full width under the icon start only below it, so a short head (one-line name, no distance)
   no longer slides "ยังไม่มีรีวิว" under the icon */
.toilet-card .card-top{display:contents}
body.tk-app .full-map-sheet .card-head .card-top{display:block;min-height:56px}
/* map card (2026-11-17): the place line ("ในหน่วยงานราชการ · จตุจักร · เปิด 09:00–18:00 น.") wraps instead of
   cutting off the closing time; lists elsewhere keep the one-line cut */
body.tk-app .full-map-sheet .toilet-card .meta-row{flex-wrap:wrap;row-gap:2px}
body.tk-app .full-map-sheet .toilet-card .meta-row .area{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.45;min-width:0}
/* 11-17: the mode's explanation sits under "แนะนำสำหรับคุณ", right above the count line */
.tk-rec-mode{margin:-6px 2px 2px}
#tkNearby .tk-mode-missing{margin:4px 2px 6px}
.tk-rec-mode + .tk-nearby-scope,#tkNearby .tk-mode-missing + .tk-nearby-scope{margin-top:2px}

/* ---------- 3.21 คนเยอะ / แน่น: waves from the pin (orange = busy, red = packed), fade after 45 min ---------- */
.theekhee-marker .tk-pin-wave{position:absolute;left:50%;top:38%;width:0;height:0;pointer-events:none;z-index:-1}
.theekhee-marker .tk-pin-wave i{position:absolute;left:-30px;top:-30px;width:60px;height:60px;border-radius:50%;background:var(--wave,#FF8A1F);opacity:0;
  animation:tk-pin-wave 2.2s cubic-bezier(.2,.6,.4,1) infinite}
.theekhee-marker .tk-pin-wave i+i{animation-delay:1.1s}
.theekhee-marker .tk-pin-wave.is-busy{--wave:#FF8A1F}
.theekhee-marker .tk-pin-wave.is-full{--wave:#F33B3B}
.theekhee-marker .tk-pin-wave.is-full i{animation-duration:1.5s}
.theekhee-marker .tk-pin-wave.is-full i+i{animation-delay:.75s}
@keyframes tk-pin-wave{0%{transform:scale(.35);opacity:.55}100%{transform:scale(1.7);opacity:0}}
@media (prefers-reduced-motion:reduce){.theekhee-marker .tk-pin-wave i{animation:none;opacity:.25;transform:scale(1.1)}.theekhee-marker .tk-pin-wave i+i{display:none}}
/* the post-use popup's crowd buttons: one tap, coloured like the waves */
.tk-used-crowd{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;margin:6px 0 4px}
.tk-crowd-btn{border:0;border-radius:var(--radius-pill);padding:11px 8px;font:inherit;font-size:15px;font-weight:var(--fw-bold);cursor:pointer;
  background:var(--green-100);color:var(--green-800)}
.tk-crowd-btn.is-busy{background:#FFE7D1;color:#A84A00}
.tk-crowd-btn.is-full{background:#FFE0E0;color:#B3261E}
.tk-crowd-btn.is-on{background:#2FB866;color:#fff}
.tk-crowd-btn.is-busy.is-on{background:#FF8A1F;color:#fff}
.tk-crowd-btn.is-full.is-on{background:#F33B3B;color:#fff}
.tk-crowd-btn:disabled:not(.is-on){opacity:.45}
html[data-tk-theme="dark"] .tk-crowd-btn{background:rgba(110,200,90,.16);color:var(--text-strong)}
html[data-tk-theme="dark"] .tk-crowd-btn.is-busy{background:rgba(255,138,31,.2)}
html[data-tk-theme="dark"] .tk-crowd-btn.is-full{background:rgba(243,59,59,.2)}
.tk-used-or{margin:10px 0 2px;font-size:13.5px;color:var(--text-muted)}

/* home stat popups: reviews list + provinces list (3.21) */
.tk-reviews-list{display:grid;gap:10px;margin-bottom:12px}
.tk-reviews-list .card{margin:0}
.tk-prov-row{grid-template-columns:1fr auto;width:100%;border:0;background:none;padding:6px 2px;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:10px}
.tk-prov-row:hover,.tk-prov-row:focus-visible{background:var(--surface-sunken, rgba(20,38,26,.06))}
.tk-prov-row .tk-src-bar{grid-column:1 / -1}

/* mode not open yet on the live site (pet 3.21): muted, with a small "เร็ว ๆ นี้" */
.tk-mode.is-soon{color:var(--text-muted);background:var(--bg-sunken);box-shadow:none}
.tk-mode.is-soon .tk-soon{margin-left:6px;font-size:11px;font-weight:700;color:var(--text-muted)}

/* 30 พ.ย. เรื่องน่ารู้ (บทความ /guide/) บนหน้าแรก: การ์ดรูปเลื่อนข้าง เหมือนฟีดข่าว · ไม่มีเงา ไม่มีเส้น */
.tk-guide-home{margin-top:24px}
.tk-guide-row{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 -12px;padding:2px 12px 6px}
.tk-guide-row::-webkit-scrollbar{display:none}
.tk-guide-card{flex:0 0 min(260px,74vw);scroll-snap-align:start;display:flex;flex-direction:column;background:var(--surface-card);
  border-radius:22px;overflow:hidden;color:var(--text-body);text-decoration:none;transition:transform var(--dur-fast) var(--ease-pop)}
.tk-guide-card:active{transform:scale(.97)}
.tk-guide-card img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;background:var(--bg-page)}
.tk-guide-text{display:flex;flex-direction:column;gap:5px;padding:12px 14px 14px}
.tk-guide-text i{font-style:normal;font-size:12px;font-weight:var(--fw-semibold);color:var(--text-link)}
.tk-guide-text strong{font-size:16px;line-height:1.4;color:var(--text-strong);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tk-guide-text small{font-size:12px;color:var(--text-muted)}

/* ---------- การแจ้งเตือน (app/push.js · 12-01) ---------- */
.tk-push-body{display:flex;flex-direction:column;gap:12px}
.tk-push-lead{margin:0;color:var(--text-body);line-height:1.6}
.tk-push-note{margin:0;padding:12px 14px;border-radius:var(--radius-card);background:var(--surface-brand-soft);color:var(--text-body);line-height:1.6}
.tk-push-steps{margin:0;padding-left:22px;color:var(--text-body);line-height:1.8}
.tk-push-msg{margin:0;padding:10px 14px;border-radius:var(--radius-card);background:var(--surface-brand-soft);color:var(--green-700, #1E7A35);font-weight:700}
.tk-push-main{width:100%}
.tk-push-ask{display:flex;flex-direction:column;gap:8px}
.tk-push-ask .btn{width:100%}
.tk-push-rules{margin:0;font-size:13px;color:var(--text-muted);line-height:1.5;text-align:center}
.tk-push-list{display:flex;flex-direction:column;gap:2px}
.tk-push-row{display:flex;align-items:center;gap:12px;padding:10px 2px}
.tk-push-row > img{width:34px;height:34px;flex:0 0 auto}
.tk-push-text{display:flex;flex-direction:column;flex:1;min-width:0}
.tk-push-label{font-weight:700;color:var(--text-strong)}
.tk-push-hint{font-size:13px;color:var(--text-muted);line-height:1.45}
.tk-push-switch{position:relative;flex:0 0 auto;width:50px;height:30px;padding:0;border:0;border-radius:15px;background:var(--line);cursor:pointer;transition:background .2s}
.tk-push-switch span{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;transition:transform .2s}
.tk-push-switch.is-on{background:var(--green-500)}
.tk-push-switch.is-on span{transform:translateX(20px)}
.tk-push-time{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px 0 6px 46px;padding:8px 12px;border-radius:var(--radius-card);background:var(--surface-brand-soft)}
.tk-push-time span{font-size:14px;color:var(--text-body)}
.tk-push-time select{font:inherit;font-weight:700;border:0;border-radius:10px;padding:6px 10px;background:var(--surface-card);color:var(--text-strong)}
.tk-push-off{align-self:center;border:0;background:none;color:var(--text-muted);font:inherit;font-size:14px;text-decoration:underline;cursor:pointer;padding:6px}
html[data-tk-theme="dark"] .tk-push-switch span{background:#E8F1EA}

/* ---------- ช่วงเทศกาล: การ์ดห้องน้ำตามเส้นทาง (12-01) ---------- */
.tk-season-card{text-decoration:none;background:var(--surface-card)}   /* ขาว (เจ้าของ 1 ธ.ค.) */
.tk-season-icon{flex:0 0 auto;width:44px;height:44px;display:grid;place-items:center;font-size:26px}
.tk-season-icon img{width:34px;height:34px}

/* ---------- แชร์ผลงานของฉัน (features.js impact card · 12-01) ---------- */
.tk-impact-share{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:10px 0 4px}

/* ---------- เกม: เล่นติดกัน (games.js streak · 12-01) ---------- */
.tk-streak{display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:12px 16px;border-radius:var(--radius-card);background:var(--surface-card)}
.tk-streak.is-on{background:#FFF1DC}
.tk-streak-fire{font-size:28px;line-height:1;filter:grayscale(1);opacity:.55}
.tk-streak.is-on .tk-streak-fire{filter:none;opacity:1}
.tk-streak-fire img{width:30px;height:30px}
.tk-streak-text{display:flex;flex-direction:column;min-width:0}
.tk-streak-text > span{font-weight:800;color:var(--text-strong)}
.tk-streak-text small{font-size:13px;color:var(--text-muted)}
.tk-streak-up{display:block;margin:2px 0 6px;font-weight:800;color:#B4590B}
html[data-tk-theme="dark"] .tk-streak.is-on{background:#3A2C1A}
html[data-tk-theme="dark"] .tk-streak-up{color:#FFB35C}

/* ---------- 👑 Pro: สมุดสะสมฉบับทอง (12-05, features.js) ---------- */
.tk-pass-gold{display:table;margin:6px auto 0;padding:3px 12px;border-radius:99px;font-size:13px;font-weight:var(--fw-semibold);color:#5C4300;background:linear-gradient(135deg,#F7D774,#F2C94C)}
.tk-passport.is-gold .tk-pass-nums span{background:var(--sun-100)}
.tk-passport.is-gold .tk-pass-nums b{color:#9A6B00}
.tk-passport.is-gold .tk-pass-next i b{background:linear-gradient(90deg,#F2C94C,#D99A00)}
.tk-passport.is-gold .tk-pass-badges span.is-on{color:#5C4300;background:linear-gradient(135deg,#F7D774,#F2C94C)}
.tk-pass-gold img,.tk-pass-year img{width:18px;height:18px;vertical-align:-3px}
.tk-pass-seals{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:10px}
.tk-seal{display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:1;border-radius:50%;padding:8px;text-align:center;
  background:radial-gradient(circle at 35% 30%,#FFF3C4,#F2C94C 60%,#D99A00)}
.tk-seal b{font-size:22px;line-height:1;color:#3D2A00}
.tk-seal small{margin-top:3px;font-size:11px;line-height:1.2;color:#3D2A00;font-weight:var(--fw-semibold);overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tk-pass-year{margin:14px 0 0;color:#3D2A00;background:linear-gradient(135deg,#F7D774,#F2C94C)}
html[data-tk-theme="dark"] .tk-passport.is-gold .tk-pass-nums span{background:rgba(242,201,76,.14)}
html[data-tk-theme="dark"] .tk-passport.is-gold .tk-pass-nums b{color:#F2C94C}

/* ---------- 👑 Pro: ทางประจำ (12-05, features.js) ---------- */
.tk-routes{margin-top:18px}
.tk-route-row{display:flex;align-items:center;gap:6px;margin:0 0 8px}
.tk-route-open{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 12px;border:0;border-radius:14px;
  background:var(--bg-sunken);color:var(--text-strong);font:inherit;text-align:left;cursor:pointer}
.tk-route-txt{display:flex;flex-direction:column;min-width:0}
.tk-route-open b{font-size:15px;font-weight:var(--fw-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-route-open small{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-route-open img{width:20px;height:20px}
.tk-route-del{flex:0 0 auto;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--text-faint);cursor:pointer}
.tk-route-del svg{width:18px;height:18px}
.tk-routes .btn.is-locked{color:var(--text-muted)}
.tk-routes .btn img,.tk-route-step img,.tk-route-pop .btn img{width:18px;height:18px;vertical-align:-3px}
.tk-route-ends{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 14px}
.tk-route-ends p{margin:0;padding:10px 12px;border-radius:14px;background:var(--bg-sunken);display:flex;flex-direction:column;gap:2px;min-width:0}
.tk-route-ends p.is-now{background:var(--sun-100)}
.tk-route-ends small,.tk-route-label small{font-size:12px;color:var(--text-muted)}
.tk-route-ends b{font-size:14px;color:var(--text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-route-ends span{font-size:14px;color:var(--text-faint)}
.tk-route-step{margin:0 0 8px;font-weight:var(--fw-semibold);color:var(--text-strong)}
.tk-route-q{display:block;width:100%;height:48px;margin:10px 0 8px;padding:0 16px;border:0;border-radius:14px;background:var(--tk-fill);color:var(--text-strong);font:inherit;font-size:16px;-webkit-appearance:none;appearance:none}
.tk-route-q::placeholder{color:var(--text-faint)}
.tk-route-q::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.tk-route-label{display:flex;flex-direction:column;gap:6px}
.tk-route-label input{height:46px;padding:0 14px;border:0;border-radius:14px;background:var(--bg-sunken);color:var(--text-strong);font:inherit;font-size:16px}
.tk-route-sum{margin:0 0 10px;font-size:14px;color:var(--text-body)}
.tk-route-empty{margin:10px 2px;font-size:14px;color:var(--text-muted)}
.tk-route-note{margin:14px 2px 4px;font-size:12px;line-height:1.5;color:var(--text-faint)}
html[data-tk-theme="dark"] .tk-route-ends p.is-now{background:rgba(242,201,76,.16)}

/* ---------- 👑 Pro: profile crown, Pro tag, locked Pro stickers, gold touches (12-05) ---------- */
.tk-profile .hall-avatar{position:relative;overflow:visible}
.tk-pro-crown{position:absolute;top:-13px;left:50%;transform:translateX(-50%) rotate(-8deg);width:30px;height:22px;display:grid;place-items:center;pointer-events:none}
.tk-pro-crown .tk-crown{width:30px;height:22px;color:#F2B705}
.tk-pro-tag{display:inline-flex;align-items:center;gap:3px;margin-left:6px;padding:1px 8px 1px 6px;border-radius:99px;vertical-align:2px;
  font-size:12px;font-weight:var(--fw-bold);line-height:1.5;color:#3D2A00;background:linear-gradient(135deg,#F7D774,#F2C94C)}
.tk-pro-tag .tk-crown{width:13px;height:13px;color:#7A5200}
.tk-sticker.is-locked{opacity:.55}
.tk-sticker.is-locked::after{content:"🔒";position:absolute;top:2px;right:4px;font-size:13px;line-height:1}
.tk-sticker-lock{grid-column:1/-1;margin:0 0 4px;padding:10px 12px;border-radius:14px;background:var(--sun-100);font-size:13px;line-height:1.5;color:#5C4300;text-align:center}
/* web Pro: the whole app wears a little gold — the active tab, and a soft glow at the top of each screen */
body.tk-premium .tk-tab.is-active{color:#9A6B00}
body.tk-premium .tk-tab.is-active .tk-tab-icon{background:#FFF1C2}
body.tk-premium .tk-tab.is-active .tk-tab-icon svg{stroke:#C08A00}
body.tk-app.tk-premium::before{content:"";position:fixed;left:0;right:0;top:0;height:140px;z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,rgba(247,215,116,.28),rgba(247,215,116,0))}
html[data-tk-theme="dark"] body.tk-premium .tk-tab.is-active{color:#F2C94C}
html[data-tk-theme="dark"] body.tk-premium .tk-tab.is-active .tk-tab-icon{background:rgba(242,201,76,.16)}
html[data-tk-theme="dark"] body.tk-premium .tk-tab.is-active .tk-tab-icon svg{stroke:#F2C94C}
html[data-tk-theme="dark"] .tk-sticker-lock{background:rgba(242,201,76,.14);color:#F5E3A8}
/* 4 sticker tabs since 👑 Pro (12-05): one row on every phone */
.tk-sticker-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}
.tk-sticker-tab{font-size:14px;padding:0 2px}
.tk-sticker-tab img{width:16px;height:16px}
@media (max-width:360px){.tk-sticker-tab{font-size:13px}}

/* 👑 Pro sticker tab (12-05 round 2): one wrapper holding picture grids + word grids per set */
.tk-sticker-grid.tk-pro-sets{display:block}
.tk-pro-sets > .tk-sticker-grid{margin-top:8px}
.tk-pro-sets > .tk-sticker-grid + .tk-sticker-grid{margin-top:14px}
.tk-pro-sets > .tk-sticker-sub{margin-top:16px;padding-top:0;border-top:0}
.tk-pro-sets > .tk-sticker-sub:first-child,.tk-pro-sets > .tk-sticker-lock + .tk-sticker-sub{margin-top:4px}

/* 🎄 festive map (app/festive.js, 12-05): sticker beside the map title, effect drawn under the pins */
.tk-fest-badge{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin-left:6px;padding:0;border:0;border-radius:12px;
  background:transparent;cursor:pointer;vertical-align:middle;-webkit-tap-highlight-color:transparent}
.tk-fest-badge img{width:30px;height:30px;display:block;animation:tk-fest-bob 2.8s ease-in-out infinite;transform-origin:50% 90%}
.tk-fest-badge:active img{transform:scale(.9)}
.tk-fest-badge.is-pop img{animation:tk-fest-pop .45s ease-out, tk-fest-bob 2.8s ease-in-out .45s infinite}
body.tk-fest-off .tk-fest-badge img{filter:grayscale(1);opacity:.55;animation:none}
.tk-fest-canvas{position:absolute;left:0;top:0;pointer-events:none}
body.tk-fest-off .tk-fest-canvas{display:none}
@keyframes tk-fest-bob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-3px) rotate(4deg)}}
@keyframes tk-fest-pop{0%{transform:scale(.7)}60%{transform:scale(1.18)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.tk-fest-badge img{animation:none}}
/* a little hat on "you are here" for the two big holidays (CSS only, no image) */
body[data-tk-fest="xmas"]:not(.tk-fest-off) .user-dot::before,
body[data-tk-fest="newyear"]:not(.tk-fest-off) .user-dot::before{content:"";position:absolute;left:50%;bottom:calc(100% - 4px);width:14px;height:13px;
  transform:translateX(-50%) rotate(-12deg);clip-path:polygon(50% 0,100% 100%,0 100%);background:#E53935;pointer-events:none}
body[data-tk-fest="xmas"]:not(.tk-fest-off) .user-dot::after{content:"";position:absolute;left:50%;bottom:calc(100% + 6px);width:6px;height:6px;margin-left:-5px;
  border-radius:50%;background:#fff;pointer-events:none}
body[data-tk-fest="newyear"]:not(.tk-fest-off) .user-dot::before{background:#F2B632}
