/* ---------------------------------------------------------------------------
   Material 3 color tokens (seed #00696B). Consumed by @material/web components
   through --md-sys-color-* and by the app's own layout below.
--------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --md-sys-color-primary: #00696b;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #9cf1f1;
  --md-sys-color-on-primary-container: #002020;
  --md-sys-color-secondary: #4a6363;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #cce8e7;
  --md-sys-color-on-secondary-container: #051f1f;
  --md-sys-color-tertiary: #4b607c;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #d3e4ff;
  --md-sys-color-on-tertiary-container: #041c35;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-surface: #f4fbfa;
  --md-sys-color-on-surface: #161d1d;
  --md-sys-color-surface-variant: #dae5e4;
  --md-sys-color-on-surface-variant: #3f4948;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #eef5f4;
  --md-sys-color-surface-container: #e9efee;
  --md-sys-color-surface-container-high: #e3e9e8;
  --md-sys-color-surface-container-highest: #dde4e3;
  --md-sys-color-outline: #6f7979;
  --md-sys-color-outline-variant: #bec9c8;
  --md-sys-color-inverse-surface: #2b3231;
  --md-sys-color-inverse-on-surface: #ecf2f1;
  --md-sys-color-inverse-primary: #80d4d5;

  /* App-specific status colors (vacant / occupied) */
  --tk-ok: #1b6c35;
  --tk-ok-container: #a6f4b0;
  --tk-on-ok-container: #002109;
  --tk-warn: #7a5900;
  --tk-warn-container: #ffdea0;
  --tk-on-warn-container: #261a00;

  --md-ref-typeface-brand: "Noto Sans Thai", "Roboto Flex", system-ui, sans-serif;
  --md-ref-typeface-plain: "Noto Sans Thai", "Roboto Flex", system-ui, sans-serif;

  --tk-radius-l: 28px;
  --tk-radius-m: 16px;
  --tk-radius-s: 12px;
  --tk-max: 1200px;
  --tk-gutter: 16px;
  --tk-appbar-h: 64px;
  --tk-navbar-h: 80px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --md-sys-color-primary: #80d4d5;
    --md-sys-color-on-primary: #003738;
    --md-sys-color-primary-container: #004f51;
    --md-sys-color-on-primary-container: #9cf1f1;
    --md-sys-color-secondary: #b0cccb;
    --md-sys-color-on-secondary: #1b3434;
    --md-sys-color-secondary-container: #324b4b;
    --md-sys-color-on-secondary-container: #cce8e7;
    --md-sys-color-tertiary: #b3c8e8;
    --md-sys-color-on-tertiary: #1c314b;
    --md-sys-color-tertiary-container: #334863;
    --md-sys-color-on-tertiary-container: #d3e4ff;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-surface: #0e1515;
    --md-sys-color-on-surface: #dde4e3;
    --md-sys-color-surface-variant: #3f4948;
    --md-sys-color-on-surface-variant: #bec9c8;
    --md-sys-color-surface-container-lowest: #090f0f;
    --md-sys-color-surface-container-low: #161d1d;
    --md-sys-color-surface-container: #1a2121;
    --md-sys-color-surface-container-high: #252b2b;
    --md-sys-color-surface-container-highest: #2f3636;
    --md-sys-color-outline: #899392;
    --md-sys-color-outline-variant: #3f4948;
    --md-sys-color-inverse-surface: #dde4e3;
    --md-sys-color-inverse-on-surface: #2b3231;
    --md-sys-color-inverse-primary: #00696b;
    --tk-ok: #8bd796;
    --tk-ok-container: #005227;
    --tk-on-ok-container: #a6f4b0;
    --tk-warn: #f3bf48;
    --tk-warn-container: #5c4200;
    --tk-on-warn-container: #ffdea0;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --md-sys-color-primary: #80d4d5;
  --md-sys-color-on-primary: #003738;
  --md-sys-color-primary-container: #004f51;
  --md-sys-color-on-primary-container: #9cf1f1;
  --md-sys-color-secondary: #b0cccb;
  --md-sys-color-on-secondary: #1b3434;
  --md-sys-color-secondary-container: #324b4b;
  --md-sys-color-on-secondary-container: #cce8e7;
  --md-sys-color-tertiary: #b3c8e8;
  --md-sys-color-on-tertiary: #1c314b;
  --md-sys-color-tertiary-container: #334863;
  --md-sys-color-on-tertiary-container: #d3e4ff;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-surface: #0e1515;
  --md-sys-color-on-surface: #dde4e3;
  --md-sys-color-surface-variant: #3f4948;
  --md-sys-color-on-surface-variant: #bec9c8;
  --md-sys-color-surface-container-lowest: #090f0f;
  --md-sys-color-surface-container-low: #161d1d;
  --md-sys-color-surface-container: #1a2121;
  --md-sys-color-surface-container-high: #252b2b;
  --md-sys-color-surface-container-highest: #2f3636;
  --md-sys-color-outline: #899392;
  --md-sys-color-outline-variant: #3f4948;
  --md-sys-color-inverse-surface: #dde4e3;
  --md-sys-color-inverse-on-surface: #2b3231;
  --md-sys-color-inverse-primary: #00696b;
  --tk-ok: #8bd796;
  --tk-ok-container: #005227;
  --tk-on-ok-container: #a6f4b0;
  --tk-warn: #f3bf48;
  --tk-warn-container: #5c4200;
  --tk-on-warn-container: #ffdea0;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-ref-typeface-plain);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--md-sys-color-primary);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin: 0;
}

md-icon {
  font-family: "Material Symbols Outlined";
  flex-shrink: 0;
}

.tk-container {
  width: 100%;
  max-width: var(--tk-max);
  margin: 0 auto;
  padding: 0 var(--tk-gutter);
}

.tk-main {
  padding-bottom: 48px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Top app bar
--------------------------------------------------------------------------- */
.tk-appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--tk-appbar-h);
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.tk-appbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
  min-width: 0;
}

.tk-brand img {
  width: 36px;
  height: 36px;
}

.tk-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.tk-brand__name {
  font-size: 20px;
  font-weight: 700;
}

.tk-brand__tag {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tk-topnav {
  display: none;
  gap: 4px;
}

.tk-topnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.tk-topnav a[aria-current="page"] {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.tk-lang {
  font-weight: 600;
}

@media (min-width: 840px) {
  .tk-topnav {
    display: flex;
    margin-right: 8px;
  }
}

/* ---------------------------------------------------------------------------
   Bottom navigation bar (compact widths)
--------------------------------------------------------------------------- */
.tk-navbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: var(--tk-navbar-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--md-sys-color-surface-container);
  padding-bottom: env(safe-area-inset-bottom);
}

.tk-navbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
}

.tk-navbar__pill {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 32px;
  border-radius: 16px;
}

.tk-navbar a[aria-current="page"] {
  color: var(--md-sys-color-on-surface);
}

.tk-navbar a[aria-current="page"] .tk-navbar__pill {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

body {
  padding-bottom: var(--tk-navbar-h);
}

@media (min-width: 840px) {
  .tk-navbar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* ---------------------------------------------------------------------------
   Hero
--------------------------------------------------------------------------- */
.tk-hero {
  margin-top: 16px;
  padding: 40px 24px;
  border-radius: var(--tk-radius-l);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--md-sys-color-tertiary-container) 0%, transparent 55%),
    var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.tk-hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  max-width: 18ch;
}

.tk-hero__lead {
  margin-top: 12px;
  max-width: 60ch;
  font-size: 17px;
}

.tk-search {
  margin-top: 28px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--tk-radius-m);
  background: var(--md-sys-color-surface-container-lowest);
  max-width: 880px;
}

.tk-search md-outlined-text-field,
.tk-search md-outlined-select {
  width: 100%;
}

.tk-search md-filled-button {
  height: 56px;
}

@media (min-width: 720px) {
  .tk-search {
    grid-template-columns: 1fr 220px auto;
    align-items: center;
  }
}

.tk-hero__chips {
  margin-top: 16px;
}

/* ---------------------------------------------------------------------------
   Sections & cards
--------------------------------------------------------------------------- */
.tk-section {
  margin-top: 48px;
}

.tk-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tk-section__head h2 {
  font-size: 24px;
}

.tk-section__head p {
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
}

.tk-page-head {
  margin-top: 28px;
  margin-bottom: 20px;
}

.tk-page-head h1 {
  font-size: clamp(26px, 4vw, 34px);
}

.tk-page-head p {
  margin-top: 8px;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 70ch;
}

.tk-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.tk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--tk-radius-m);
  background: var(--md-sys-color-surface-container-low);
  color: inherit;
  text-decoration: none;
  --md-elevation-level: 1;
}

.tk-card--outlined {
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  --md-elevation-level: 0;
}

.tk-card--filled {
  background: var(--md-sys-color-surface-container-highest);
  --md-elevation-level: 0;
}

.tk-card h3 {
  font-size: 18px;
}

.tk-card__desc {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
}

.tk-card__actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.tk-icon-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.tk-icon-badge--primary {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.tk-icon-badge--tertiary {
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}

.tk-channel-card__count {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
}

/* Tags / status pills (static, non-interactive) */
.tk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tk-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
}

.tk-tag md-icon {
  --md-icon-size: 16px;
}

.tk-tag--ok {
  border-color: transparent;
  background: var(--tk-ok-container);
  color: var(--tk-on-ok-container);
}

.tk-tag--warn {
  border-color: transparent;
  background: var(--tk-warn-container);
  color: var(--tk-on-warn-container);
}

.tk-tag--info {
  border-color: transparent;
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}

/* ---------------------------------------------------------------------------
   Listings
--------------------------------------------------------------------------- */
.tk-listings-layout {
  display: grid;
  gap: 24px;
}

.tk-listings-layout > * {
  min-width: 0;
}

@media (min-width: 1000px) {
  .tk-listings-layout {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }

  .tk-filters {
    position: sticky;
    top: calc(var(--tk-appbar-h) + 16px);
  }
}

.tk-filters {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--tk-radius-m);
  background: var(--md-sys-color-surface-container-low);
}

.tk-filters md-outlined-text-field,
.tk-filters md-outlined-select {
  width: 100%;
}

.tk-filters__range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tk-filters__range md-outlined-text-field {
  min-width: 0;
}

.tk-filters__presets {
  margin-top: 8px;
}

.tk-filters__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 8px;
}

.tk-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.tk-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tk-results-bar md-outlined-select {
  min-width: 200px;
}

.tk-listing {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

.tk-listing__media {
  position: relative;
  height: 132px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, var(--md-sys-color-secondary-container), var(--md-sys-color-tertiary-container));
  color: var(--md-sys-color-on-secondary-container);
}

.tk-listing__media > md-icon {
  --md-icon-size: 56px;
  opacity: 0.8;
}

.tk-listing__channel {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  border-color: transparent;
}

.tk-listing__demo {
  position: absolute;
  top: 12px;
  right: 12px;
}

.tk-listing__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 20px;
  flex: 1;
}

.tk-listing__price {
  font-size: 22px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tk-listing__was {
  font-size: 14px;
  font-weight: 400;
  color: var(--md-sys-color-on-surface-variant);
}

.tk-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tk-listing__title {
  font-size: 16px;
  font-weight: 600;
}

.tk-listing__loc {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

.tk-listing__loc md-icon {
  --md-icon-size: 18px;
}

.tk-listing__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
}

.tk-listing__facts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tk-listing__facts md-icon {
  --md-icon-size: 18px;
}

/* Nearest stop of each mode, one line each; links to walking directions. */
.tk-transit {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.tk-transit a {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  border-radius: 4px;
}

.tk-transit a:hover .tk-transit__name,
.tk-transit a:focus-visible .tk-transit__name {
  text-decoration: underline;
}

.tk-transit md-icon {
  --md-icon-size: 18px;
  flex: none;
  color: var(--md-sys-color-primary);
}

.tk-transit__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tk-transit__walk {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex: none;
  color: var(--md-sys-color-on-surface-variant);
}

.tk-transit__walk md-icon {
  color: inherit;
}

.tk-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  border: 1px dashed var(--md-sys-color-outline-variant);
  border-radius: var(--tk-radius-m);
}

.tk-empty md-icon {
  --md-icon-size: 48px;
}

.tk-loading {
  display: grid;
  place-items: center;
  padding: 64px 0;
}

/* ---------------------------------------------------------------------------
   Banners, guide, tables
--------------------------------------------------------------------------- */
.tk-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--tk-radius-s);
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  font-size: 14px;
  margin-bottom: 16px;
}

.tk-banner--warn {
  background: var(--tk-warn-container);
  color: var(--tk-on-warn-container);
}

.tk-prose {
  max-width: 76ch;
}

.tk-prose p + p,
.tk-prose p + ul,
.tk-prose ul + p {
  margin-top: 12px;
}

.tk-prose ul,
.tk-prose ol {
  padding-left: 22px;
  margin: 8px 0 0;
}

.tk-prose li + li {
  margin-top: 6px;
}

.tk-table-wrap {
  overflow-x: auto;
  border-radius: var(--tk-radius-m);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.tk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}

.tk-table th,
.tk-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.tk-table thead th {
  background: var(--md-sys-color-surface-container);
  font-weight: 600;
}

.tk-table tbody tr:last-child td,
.tk-table tbody tr:last-child th {
  border-bottom: 0;
}

.tk-table th[scope="row"] {
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  width: 26%;
}

.tk-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.tk-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: var(--tk-radius-m);
  background: var(--md-sys-color-surface-container-low);
}

.tk-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 700;
}

.tk-steps strong {
  display: block;
}

.tk-steps span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
}

.tk-source-group + .tk-source-group {
  margin-top: 40px;
}

.tk-source-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tk-source-group__head h2 {
  font-size: 22px;
}

.tk-source-group__head p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
}

.tk-source-card__domain {
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
  word-break: break-all;
}

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.tk-footer {
  margin-top: 64px;
  padding: 32px 0 40px;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

.tk-footer__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.tk-footer h2 {
  font-size: 15px;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 8px;
}

.tk-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.tk-footer a {
  color: inherit;
}

.tk-footer__legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

/* ---- Map view (listings page) ---------------------------------------------------- */
.tk-view-toggle {
  flex-wrap: nowrap;
}

.tk-area-chip {
  margin-bottom: 12px;
}

.tk-map-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tk-map-bar__actions {
  display: flex;
  align-items: center;
}

/* Full-screen map: the whole section covers the window. */
.tk-map-section.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 16px;
  background: var(--md-sys-color-surface);
}

.tk-map-section.is-fullscreen .tk-map-wrap {
  flex: 1;
  min-height: 0;
}

.tk-map-section.is-fullscreen .tk-map {
  height: 100%;
  min-height: 0;
}

.tk-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

.tk-map-legend:empty {
  display: none;
}

.tk-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tk-map-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px #ffffff, 0 0 0 2.5px var(--md-sys-color-outline-variant);
}

.tk-map-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
}

.tk-map {
  width: 100%;
  height: calc(100dvh - 260px);
  min-height: 420px;
  background: var(--md-sys-color-surface-container);
}

.tk-map-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  background: var(--md-sys-color-surface-container);
}

/* Google Maps markers (map/google-map.js), drawn to match the MapLibre map's layers. */
.tk-gm-layer > button {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  font: 700 12px/1 "Roboto Flex", system-ui, sans-serif;
}

.tk-gm-cluster {
  width: var(--size);
  height: var(--size);
  background: rgb(0 105 107 / 0.85);
  color: #ffffff;
}

.tk-gm-point {
  width: 14px;
  height: 14px;
  background: #00696b;
}

.tk-gm-point.is-selected {
  width: 20px;
  height: 20px;
  z-index: 1;
}

.tk-gm-price {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  color: #1b1b1f;
  text-shadow: 0 0 2px #ffffff, 0 0 2px #ffffff, 0 0 2px #ffffff;
}

.tk-gm-layer--prices .tk-gm-price {
  display: block;
}

/* The selected listing floats over the map; on phones it is a bottom sheet. */
.tk-map-card {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  border-radius: 16px;
  background: var(--md-sys-color-surface);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.25);
}

.tk-map-card .tk-listing {
  border: 0;
}

.tk-map-card .tk-listing + .tk-listing {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 0;
}

.tk-map-card__count {
  margin: 0;
  padding: 16px 56px 8px 16px;
  font-weight: 600;
}

.tk-map-card__close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}

@media (max-width: 599px) {
  .tk-map {
    height: calc(100dvh - 300px);
  }

  .tk-map-card {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 70%;
    border-radius: 16px 16px 0 0;
  }
}

