:root {
  color-scheme: light dark;
  --brand: #e1251b;
  --brand-strong: #b71912;
  --brand-soft: #fff1f0;
  --page: var(--tg-theme-bg-color, #f5f5f5);
  --surface: var(--tg-theme-secondary-bg-color, #ffffff);
  --surface-strong: #ffffff;
  --surface-soft: #fafafa;
  --text: var(--tg-theme-text-color, #1f1f1f);
  --muted: var(--tg-theme-hint-color, #6b7280);
  --line: #e5e7eb;
  --primary: var(--brand);
  --action-text: #b71912;
  --on-primary: #ffffff;
  --accent: #c58a00;
  --danger: var(--brand);
  --info: #2563a6;
  --shadow: 0 4px 16px rgba(31, 31, 31, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --header-height: 60px;
  --nav-height: 68px;
  --content-max: 760px;
  --safe-area-top: var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-area-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans SC", "Noto Sans Khmer", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: none;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

:where(button, a, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--action-text);
  outline-offset: 3px;
}

.material-symbols-rounded {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  font-family: "Material Symbols Rounded";
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  min-height: 100dvh;
  padding-top: var(--safe-area-top);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.brand-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
}

.brand-block > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-block strong,
.brand-block span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-block strong {
  font-size: 16px;
}

.brand-block > div > span {
  color: var(--muted);
  font-size: 12px;
}

html[lang="km"] .brand-block > div {
  gap: 0;
}

html[lang="km"] .brand-block strong {
  font-size: 14px;
  line-height: 1.15;
}

html[lang="km"] .brand-block > div > span {
  font-size: 12px;
  line-height: 1.2;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 7px;
  border-radius: 8px;
  background: var(--brand);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-button {
  display: grid;
  width: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 800;
}

.app-content {
  width: min(100%, var(--content-max));
  min-height: 0;
  margin: 0 auto;
  padding: var(--space-4);
  padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + var(--space-4));
}

:root[data-site-footer="visible"] .app-content { padding-bottom: var(--space-4); }

.page {
  display: grid;
  gap: var(--space-4);
}

.page-heading {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-heading > div {
  min-width: 0;
}

.page-heading h1,
.section-heading h2 {
  overflow-wrap: anywhere;
}

.page-back {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  justify-self: start;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--action-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.page-heading h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.25;
}

.page-heading h1 {
  font-size: 22px;
}

.page-heading p,
.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.section-heading h2 {
  font-size: 18px;
}

.section-link {
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--action-text);
  font-weight: 700;
}

.service-masthead {
  display: grid;
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0;
  padding: var(--space-4);
  gap: var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.service-masthead h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.masthead-search {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: var(--space-2);
  padding: 0 4px 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.masthead-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.masthead-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.masthead-search button {
  display: grid;
  width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
}

.masthead-search button .material-symbols-rounded,
.masthead-search span:first-child {
  color: var(--brand);
  font-size: 20px;
}

.masthead-search button .material-symbols-rounded {
  color: #ffffff;
}

.masthead-search:focus-within {
  outline: 2px solid var(--action-text);
  outline-offset: 2px;
}

.masthead-search input:focus-visible {
  outline: none;
}

.masthead-search > span:last-child,
.quick-action > span:last-child,
.button-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button,
.secondary-button,
.compact-action {
  min-width: 0;
  white-space: nowrap;
}

.home-page .section-heading {
  margin-top: 4px;
}

.home-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.status-cell {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
  padding: var(--space-4);
  text-align: left;
}

.status-cell + .status-cell {
  border-left: 1px solid var(--line);
}

.status-cell > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recent-flight-list > strong {
  font-size: 14px;
  line-height: 1.45;
}

.recent-flight-list > strong:not(.recent-flight-row) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.weather-lines,
.recent-flight-list {
  display: grid;
  gap: 4px;
}

.weather-lines {
  gap: 2px;
}

.weather-location,
.weather-temperature,
.weather-condition,
.weather-metric,
.weather-updated {
  display: block;
  overflow-wrap: anywhere;
}

.weather-location {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.weather-temperature {
  color: var(--text);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.weather-condition {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.weather-metric {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.weather-updated {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: normal;
}

.weather-lines-detail {
  gap: var(--space-2);
}

.weather-lines-detail .weather-location {
  font-size: 15px;
}

.weather-lines-detail .weather-condition {
  font-size: 18px;
}

.weather-lines-detail .weather-metric {
  font-size: 14px;
}

.weather-lines-detail .weather-updated {
  font-size: 12px;
}

.weather-page {
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
}

.weather-current-panel {
  margin-bottom: var(--space-5);
}

.weather-forecast-section .section-heading {
  margin-bottom: var(--space-2);
}

.weather-forecast-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.weather-forecast-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "day temperature"
    "meta meta";
  gap: 8px var(--space-3);
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.weather-forecast-day {
  grid-area: day;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weather-forecast-day time {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.weather-forecast-day span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.weather-forecast-temperature {
  grid-area: temperature;
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.weather-forecast-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-4);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.4;
}

.weather-forecast-empty {
  margin: 0;
  padding: var(--space-4) 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.recent-flight-row {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.recent-flight-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.recent-flight-row > span:first-child {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.recent-flight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--space-2);
}

.recent-flight-meta > span {
  white-space: nowrap;
}

.recent-flight-row > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.flight-schedule-label {
  display: block;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.quick-action {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(31, 31, 31, 0.02);
  text-align: left;
  font-weight: 600;
}

.quick-action span:first-child {
  width: 28px;
  flex: 0 0 28px;
  font-size: 24px;
  text-align: center;
}

.healthcare-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.healthcare-entry-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--action-text);
  background: var(--surface);
  border-radius: 6px;
}

.healthcare-entry-copy { display: grid; min-width: 0; gap: 4px; }
.healthcare-entry-copy strong { font-size: 16px; font-weight: 600; }
.healthcare-entry-copy > span { font-size: 13px; color: var(--muted); }
.healthcare-entry-copy small { font-size: 12px; color: var(--muted); }
.healthcare-entry > .material-symbols-rounded { color: var(--muted); }
.healthcare-entry:focus-visible { outline: 3px solid var(--action-text); outline-offset: 3px; }

.quick-action:active,
.result-card:active,
.nav-item:active,
.chip:active {
  transform: scale(0.985);
}

.home-banner-section {
  display: grid;
  gap: var(--space-2);
}

.home-banner-carousel {
  position: relative;
  min-width: 0;
}

.home-banner-track {
  display: flex;
  overflow-x: auto;
  border-radius: 8px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.home-banner-track::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.home-banner-slide {
  min-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  scroll-snap-align: start;
}

.home-banner-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 64 / 17;
  object-fit: cover;
}

.home-banner-dots {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  display: flex;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
}

.home-banner-dots button {
  width: 6px;
  height: 6px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.home-banner-dots button.is-active {
  width: 18px;
  border-radius: 3px;
  background: #ffffff;
}

.search-form,
.filter-bar {
  display: grid;
  gap: var(--space-2);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: var(--space-2);
}

.field,
.select-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  padding: 10px 12px;
}

.field:focus,
.select-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.search-button,
.primary-button,
.secondary-button,
.chip,
.segmented button,
.pagination button {
  min-height: 48px;
  border-radius: 8px;
}

.search-button,
.primary-button,
.secondary-button,
.chip,
.pagination button,
.detail-action-dock > *,
.action-bar > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.primary-button,
.secondary-button {
  padding: 0 var(--space-4);
}

.primary-button .material-symbols-rounded,
.secondary-button .material-symbols-rounded,
.chip .material-symbols-rounded,
.pagination .material-symbols-rounded {
  font-size: 20px;
}

.search-button,
.primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

.search-button {
  font-size: 20px;
}

.compact-action {
  min-width: max-content;
  padding: 0 13px;
}

.page-heading .compact-action {
  max-width: 152px;
  flex: 0 1 auto;
  padding: 8px 12px;
  line-height: 1.25;
}

@media (max-width: 359px) {
  .page-heading-action {
    align-items: stretch;
    flex-direction: column;
    gap: var(--space-3);
  }

  .page-heading-action .compact-action {
    width: 100%;
    max-width: none;
  }
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.secondary-button:visited {
  color: var(--text);
}

.primary-button:visited {
  color: var(--on-primary);
}

.filter-scroll {
  display: flex;
  margin: 0 calc(-1 * var(--space-4));
  padding: 0 var(--space-4) var(--space-1);
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.result-summary {
  margin-top: 2px;
}

.result-summary h2 {
  font-size: 16px;
}

.result-summary span {
  color: var(--muted);
  font-size: 12px;
}

.chip {
  flex: 0 0 auto;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
}

.chip.is-active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--action-text);
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.segmented button {
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--action-text);
  box-shadow: var(--shadow);
}

.result-list,
.news-list,
.media-gallery,
.detail-stack {
  display: grid;
  gap: var(--space-2);
}

.news-list {
  gap: var(--space-4);
}

.global-search-results,
.search-result-group {
  display: grid;
  gap: var(--space-3);
}

.search-result-group + .search-result-group {
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.search-result-group .section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.search-result-group .section-heading .material-symbols-rounded {
  color: var(--action-text);
  font-size: 21px;
}

.search-more {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--action-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.question-examples {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.question-examples button {
  display: inline-flex;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.empty-actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.empty-actions > * {
  max-width: 100%;
  padding: var(--space-2) var(--space-3);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.empty-actions .button-label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.knowledge-card {
  min-height: 108px;
}

.knowledge-answer {
  margin-top: var(--space-4);
  padding: var(--space-5);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 8px;
  background: var(--surface);
}

.knowledge-web-sources { margin-top: 24px; }
.knowledge-web-sources h3 { font-size: 15px; margin: 0 0 8px; }
.knowledge-web-source {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 6px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
  overflow-wrap: anywhere;
  color: var(--text);
}
.knowledge-web-source .material-symbols-rounded { color: var(--action-text); }
.knowledge-web-source small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
#knowledge-results > .result-list { margin-top: 16px; }

.knowledge-answer-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--action-text);
}

.knowledge-answer-heading h2,
.knowledge-answer p {
  margin: 0;
}

.knowledge-answer-heading h2 {
  color: var(--text);
  font-size: 17px;
}

.knowledge-answer p {
  margin-top: var(--space-3);
  font-size: 15px;
  line-height: 1.75;
}

.knowledge-references {
  margin-top: var(--space-4);
}

.knowledge-references summary {
  padding: var(--space-3) 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.knowledge-result-heading {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
}

.knowledge-result-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--action-text);
}

.knowledge-result-icon .material-symbols-rounded {
  font-size: 21px;
}

.knowledge-summary {
  display: grid;
  gap: 5px;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.knowledge-summary > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.knowledge-summary p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.flight-card .card-title {
  padding-right: 8px;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-2);
}

.marketplace-grid > .empty-state,
.marketplace-grid > .error-state,
.marketplace-grid > .loading-state,
.marketplace-grid > .marketplace-scroll-sentinel {
  grid-column: 1 / -1;
}

.result-card,
.news-item,
.detail-panel {
  content-visibility: auto;
  contain-intrinsic-size: 1px 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.result-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 118px;
}

.merchant-card {
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 116px;
}

.job-symbol {
  display: grid;
  width: 60px;
  min-height: 100%;
  place-items: center;
  background: var(--surface-soft);
  font-size: 26px;
}

.job-symbol .material-symbols-rounded {
  font-size: 28px;
}

.merchant-cover {
  display: grid;
  width: 88px;
  height: 100%;
  min-height: 116px;
  place-items: center;
  object-fit: cover;
  background: var(--surface-soft);
  color: var(--muted);
}

.merchant-cover-placeholder .material-symbols-rounded {
  font-size: 30px;
}

.merchant-card .card-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 6px;
}

.merchant-card .card-title > span:last-child {
  min-width: 0;
}

.merchant-title-icon {
  margin-top: 1px;
  color: var(--action-text);
  font-size: 19px;
}

.merchant-scroll-sentinel,
.marketplace-scroll-sentinel {
  display: grid;
  min-height: 72px;
  place-items: center;
}

.merchant-scroll-sentinel .loading-spinner,
.marketplace-scroll-sentinel .loading-spinner {
  width: 24px;
  height: 24px;
}

.marketplace-card {
  display: block;
  min-height: 0;
}

.marketplace-card .card-media,
.marketplace-card .media-placeholder {
  display: grid;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  place-items: center;
  object-fit: cover;
  background: var(--surface-soft);
  color: #9ca3af;
  font-size: 30px;
}

.marketplace-card .card-content {
  gap: 7px;
  padding: 10px;
}

.marketplace-card .card-title {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-card .card-description {
  -webkit-line-clamp: 1;
}

.market-price-row {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.market-price-row .price {
  font-size: 19px;
  line-height: 1;
}

.media-total {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--muted);
  font-size: 12px;
}

.media-total .material-symbols-rounded {
  font-size: 15px;
}

.recruitment-list .result-card {
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 108px;
}

.recruitment-list .job-symbol {
  width: 52px;
}

.recruitment-list .card-media {
  width: 52px;
  min-height: 108px;
}

.result-card.job-card.has-job-media {
  grid-template-columns: 88px minmax(0, 1fr);
}

.job-cover {
  display: grid;
  place-items: center;
  width: 88px;
  height: 100%;
  min-height: 118px;
  object-fit: contain;
  padding: 6px;
  background: var(--surface-soft);
}

.job-card .card-title-row {
  flex-wrap: wrap;
}

.job-card .price {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.result-card.no-media {
  grid-template-columns: 1fr;
}

.card-media {
  width: 96px;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  background: #e5e9e6;
}

.card-content {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
  padding: 12px;
}

.card-title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.35;
}

.card-meta,
.card-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price {
  flex: 0 0 auto;
  color: var(--action-text);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 30%, var(--surface));
  color: #634800;
  font-size: 12px;
  font-weight: 700;
}

.badge .material-symbols-rounded {
  font-size: 16px;
}

.card-hit {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
}

.result-card {
  position: relative;
}

.result-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--primary) 25%, transparent);
  outline-offset: 2px;
}

.news-item {
  padding: var(--space-4);
}

.news-item:has(.news-link) {
  padding: 0;
}

.news-link {
  display: block;
  min-width: 0;
  padding: var(--space-4);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.news-link:visited {
  color: var(--text);
}

.news-link:focus-visible {
  outline-offset: -3px;
}

.news-link:hover .news-read-more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-item time {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.news-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-3);
  color: var(--action-text);
  font-size: 13px;
  font-weight: 750;
}

.news-read-more .material-symbols-rounded {
  font-size: 18px;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.pagination button {
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 750;
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.pagination span {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.media-viewer {
  position: relative;
  min-width: 0;
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0;
  background: #111111;
  color: #ffffff;
}

.media-gallery {
  position: relative;
  min-width: 0;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #111111;
}

.media-gallery::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 4 / 3;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery-image-button {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: #111111;
  cursor: zoom-in;
}

.media-gallery:focus-visible,
.gallery-image-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -3px;
}

.gallery-item img,
.gallery-item video {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #111111;
}

.image-dialog-toolbar button {
  display: grid;
  width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #626268;
  border-radius: 8px;
  background: #242426;
  color: #ffffff;
}

.gallery-nav {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #ffffff;
}

.gallery-nav .material-symbols-rounded {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.54);
  font-size: 20px;
}

.gallery-previous { left: 4px; }
.gallery-next { right: 4px; }

.gallery-nav:disabled {
  visibility: hidden;
}

@media (min-width: 700px) and (hover: hover) and (pointer: fine) {
  .gallery-nav { display: grid; }
  .gallery-nav:hover .material-symbols-rounded { background: rgba(0, 0, 0, 0.78); }
}

.gallery-position {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

.media-viewer[data-active-kind="video"] .gallery-position {
  top: 12px;
  bottom: auto;
}

.gallery-error {
  display: grid;
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  align-content: center;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow: auto;
  background: #111111;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.gallery-error p {
  margin: 0;
}

.gallery-error button {
  min-height: 44px;
}

.gallery-item [hidden] {
  display: none;
}

.image-dialog {
  width: min(1120px, calc(100vw - 24px));
  height: calc(100dvh - 24px - var(--safe-area-top) - var(--safe-area-bottom));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px - var(--safe-area-top) - var(--safe-area-bottom));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #626268;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  color-scheme: dark;
}

.image-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.image-dialog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border-bottom: 1px solid #363638;
  background: #1c1c1e;
}

.image-dialog-toolbar > span {
  min-width: 0;
  max-height: 4.5em;
  overflow: auto;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gallery-nav:focus-visible,
.image-dialog-toolbar button:focus-visible {
  outline-color: #ffffff;
}

.image-dialog-body {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.image-dialog-body img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-dialog.is-zoomed .image-dialog-body img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  flex: 0 0 auto;
  align-self: flex-start;
  margin: auto;
}

.detail-panel {
  padding: var(--space-4);
}

.detail-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-stack {
  padding-bottom: 76px;
}

.detail-panel:first-of-type .price {
  display: block;
  margin-top: 10px;
  font-size: 26px;
}

.detail-copy {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.detail-facts {
  display: grid;
  margin: 0;
}

.detail-facts > div {
  display: grid;
  grid-template-columns: minmax(88px, 0.42fr) 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts > div:last-child {
  border-bottom: 0;
}

.detail-facts dt {
  color: var(--muted);
}

.detail-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.action-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.action-bar > * {
  min-height: 50px;
  border-radius: 8px;
  text-decoration: none;
}

.profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}

.profile-actions > * {
  min-width: 0;
  min-height: 56px;
  justify-content: flex-start;
  padding: var(--space-3) var(--space-4);
  line-height: 1.6;
}

.profile-actions .quick-action > span:last-child,
.profile-actions .button-label {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.detail-action-dock {
  position: fixed;
  z-index: 35;
  right: 0;
  bottom: calc(var(--nav-height) + var(--safe-area-bottom));
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
}

.detail-action-dock > * {
  min-height: 50px;
  border-radius: 8px;
  text-decoration: none;
}

.detail-action-dock > :only-child {
  grid-column: 1 / -1;
}

.action-bar > :only-child {
  grid-column: 1 / -1;
}

.empty-state,
.error-state,
.loading-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: var(--space-3);
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.error-state strong {
  color: var(--text);
  font-size: 18px;
}

.empty-state > .material-symbols-rounded,
.error-state > .material-symbols-rounded {
  color: var(--action-text);
  font-size: 40px;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.skeleton {
  min-height: 118px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--line) 55%, var(--surface));
  animation: pulse 1.2s ease-in-out infinite;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 14px);
  left: 16px;
  max-width: 560px;
  min-height: 48px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  background: #17241d;
  color: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.official-site-footer {
  width: min(100%, var(--content-max));
  margin: var(--space-2) auto 0;
  padding: 0 var(--space-4) calc(var(--nav-height) + var(--safe-area-bottom) + var(--space-3));
  padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + var(--space-3));
}

.official-site-link {
  display: grid;
  grid-template-columns: clamp(96px, 30vw, 128px) minmax(0, 1fr) 32px;
  max-width: 520px;
  min-width: 0;
  min-height: 60px;
  margin: 0 auto;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--action-text);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
}

.official-site-link:active {
  transform: scale(0.99);
}

.official-site-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, #ffffff);
  outline-offset: 2px;
}

.official-site-logo-frame {
  display: block;
  width: 100%;
  height: 30px;
  overflow: hidden;
}

.official-site-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.official-site-label {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-site-link > .material-symbols-rounded {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  font-size: 19px;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(var(--nav-height) + var(--safe-area-bottom));
  padding: 4px max(6px, env(safe-area-inset-left)) var(--safe-area-bottom) max(6px, env(safe-area-inset-right));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(14px);
}

.nav-item {
  display: grid;
  min-width: 0;
  min-height: 60px;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.nav-item > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  color: var(--action-text);
  font-weight: 700;
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  font-size: 23px;
  font-weight: 500;
}

.nav-item.is-active .nav-icon {
  background: var(--brand-soft);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { opacity: 0.52; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

:root[data-theme="dark"] {
    --brand: #e1251b;
    --brand-strong: #ff6259;
    --brand-soft: #321513;
    --action-text: #ff756c;
    --page: var(--tg-theme-bg-color, #111111);
    --surface: var(--tg-theme-secondary-bg-color, #1c1c1e);
    --surface-strong: #242426;
    --surface-soft: #252527;
    --text: var(--tg-theme-text-color, #f5f5f5);
    --muted: var(--tg-theme-hint-color, #a1a1aa);
    --line: #363638;
    --accent: #f2bb32;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #e1251b;
    --brand-strong: #ff6259;
    --brand-soft: #321513;
    --action-text: #ff756c;
    --page: var(--tg-theme-bg-color, #111111);
    --surface: var(--tg-theme-secondary-bg-color, #1c1c1e);
    --surface-strong: #242426;
    --surface-soft: #252527;
    --text: var(--tg-theme-text-color, #f5f5f5);
    --muted: var(--tg-theme-hint-color, #a1a1aa);
    --line: #363638;
    --accent: #f2bb32;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  }

  .badge {
    color: #f4d77d;
  }
}

@media (min-width: 700px) {
  .app-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .media-viewer {
    margin-right: 0;
    margin-left: 0;
    border-radius: 8px;
  }

  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .profile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merchant-list,
  .recruitment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Full-width address entry uses its own three-column layout, not a quick-grid button. */
.profile-address-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.6;
}
.profile-address-link:visited { color: var(--text); }
.profile-address-link > .material-symbols-rounded { font-size: 24px; overflow: hidden; }
.profile-address-link > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.profile-address-link:focus-visible { outline: 2px solid var(--action-text); outline-offset: 3px; }


/* 2026-10-20 screenshot audit: keep long Chinese/Khmer labels readable. */
.quick-grid .quick-action > span:last-child {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.merchant-card .card-title-row { flex-direction: row; flex-wrap: wrap; gap: 6px 10px; }
.merchant-card .badge { max-width: 100%; line-height: 1.6; border-radius: 6px; }
.merchant-card .card-title { line-height: 1.6; }
.detail-panel .card-title-row { flex-wrap: wrap; }
.filter-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.sort-options { flex-wrap: wrap; overflow-x: visible; }
.sort-options .chip { flex: 1 0 auto; min-width: max-content; padding: 10px 12px; white-space: normal; }
.sort-options .button-label { white-space: normal; overflow: visible; line-height: 1.6; }

/* Home: useful graphics, with text and data kept as the primary accessible content. */
.home-overview {
  display: grid;
  gap: 10px;
}
.home-weather, .home-flight {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
}
.home-weather {
  background: color-mix(in srgb, var(--surface) 94%, #cde9f5);
  padding: 14px 16px;
}
.home-card-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}
.home-card-label > span:not(.material-symbols-rounded) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.home-weather-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}
.home-weather-reading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}
.home-weather-reading > strong {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.4px;
}
.home-weather-reading > span {
  font-size: 14px;
}
.home-weather-art {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
}
.home-weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.home-weather-metrics > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-right: 6px;
}
.home-weather-metrics > span + span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.home-weather-metrics > span > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.home-weather-metrics strong {
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.home-weather-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.home-weather-footer > span:last-child {
  display: inline-flex;
  align-items: center;
  color: var(--action-text);
}
.home-weather-footer .material-symbols-rounded {
  font-size: 16px;
}
.home-weather-legacy {
  position: relative;
}
.home-weather-legacy > .material-symbols-rounded {
  position: absolute;
  top: 16px;
  right: 12px;
}
.home-weather-legacy .weather-lines {
  margin-top: 8px;
}
.home-flight {
  padding: 13px 16px;
}
.home-flight .home-card-label > .material-symbols-rounded:first-child {
  color: color-mix(in srgb, var(--text) 65%, var(--info));
  font-size: 19px;
}
.home-flight .home-card-label > .material-symbols-rounded:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 19px;
}
.home-flight-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}
.home-flight-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 8px;
}
.home-flight-route > span:not(.home-flight-line) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.home-flight-route strong {
  font-size: 20px;
  letter-spacing: .6px;
}
.home-flight-route small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.home-flight-line {
  display: flex;
  justify-content: center;
  position: relative;
  color: color-mix(in srgb, var(--text) 65%, var(--info));
}
.home-flight-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed var(--line);
}
.home-flight-line .material-symbols-rounded {
  position: relative;
  background: var(--surface);
  font-size: 22px;
  padding: 0 3px;
}
.home-flight-time {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.home-flight-time strong {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}
.home-flight-time small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.home-flight-note, .home-flight-empty > small {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.home-flight-empty > strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.7;
}
.home-flight-empty > small {
  margin-top: 2px;
}
.home-page .quick-grid {
  gap: 10px;
}
.home-page .quick-action {
  min-height: 92px;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 12px;
  box-shadow: none;
}
.home-page .quick-action > .home-service-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, #e1251b);
}
.home-page .home-service-marketplace > .home-service-icon {
  background: color-mix(in srgb, var(--surface) 88%, #d58b19);
}
.home-page .home-service-recruitment > .home-service-icon {
  background: color-mix(in srgb, var(--surface) 88%, #5686c7);
}
.home-page .home-service-knowledge > .home-service-icon {
  background: color-mix(in srgb, var(--surface) 88%, #27897a);
}
.home-service-icon img {
  display: block;
  width: 32px;
  height: 32px;
}
.home-service-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.home-service-copy strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}
.home-service-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
}
.home-page .healthcare-entry {
  margin-top: 0;
  padding: 16px 0;
}
.home-page .healthcare-entry-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, #e1251b);
}
.home-page .healthcare-entry-icon img {
  width: 32px;
  height: 32px;
}
.home-banner-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
  text-align: left;
}
.home-banner-caption .material-symbols-rounded {
  color: var(--action-text);
  flex: 0 0 auto;
  font-size: 18px;
}
.home-news-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.home-news-item {
  min-width: 0;
}
.home-news-item + .home-news-item {
  border-top: 1px solid var(--line);
}
.home-news-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.home-news-link:visited {
  color: var(--text);
}
.home-news-link:focus-visible {
  outline-offset: -3px;
}
.home-news-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
}
.home-news-copy > time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.home-news-copy > strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.65;
}
.home-news-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-soft);
}
.home-news-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--action-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}
.home-news-more .material-symbols-rounded {
  font-size: 16px;
}
.home-news-compact .home-news-copy {
  padding: 14px 16px;
  gap: 5px;
}
.home-news-compact .home-news-copy > strong {
  font-size: 14px;
}
.home-news-compact.has-cover .home-news-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
  padding-right: 16px;
}
.home-news-compact.has-cover .home-news-cover {
  grid-column: 2;
  grid-row: 1;
  width: 88px;
  height: 76px;
  aspect-ratio: auto;
  border-radius: 8px;
}
.home-news-compact.has-cover .home-news-copy {
  grid-column: 1;
  grid-row: 1;
  padding-right: 0;
}
@media (max-width: 359px) {
  .home-weather-reading > strong {
    font-size: 36px;
  }
  .home-weather-art {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }
  .home-page .quick-action {
    padding: 12px 10px;
    gap: 8px;
  }
  .home-page .quick-action > .home-service-icon {
    width: 34px;
    flex-basis: 34px;
    height: 40px;
  }
  .home-service-icon img {
    width: 28px;
    height: 28px;
  }
  .home-flight-body {
    gap: 10px;
  }
  .home-flight-route {
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
  }
  .home-flight-route strong {
    font-size: 18px;
  }
  .home-flight-time strong {
    font-size: 21px;
  }
}
.home-weather-unavailable {
  display: flex;
  align-items: center;
  gap: 12px;
}
.home-weather-unavailable > img {
  flex: 0 0 56px;
}
.home-weather-unavailable > span:not(.material-symbols-rounded) {
  min-width: 0;
  flex: 1;
}
.home-weather-unavailable strong {
  font-size: 14px;
}
.home-page .home-banner-dots {
  position: absolute;
  right: 8px;
  left: auto;
  bottom: 8px;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 16px);
  overflow-x: auto;
  gap: 0;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0;
}
.home-page .home-banner-dots button,
.home-page .home-banner-dots button.is-active {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  opacity: 1;
}
.home-page .home-banner-dots button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: var(--muted);
  opacity: .35;
}
.home-page .home-banner-dots button.is-active::before {
  width: 18px;
  background: var(--brand);
  opacity: 1;
}
.home-flight .home-card-label .material-symbols-rounded {
  line-height: 1;
}
.home-flight-route strong {
  line-height: 1.2;
}
.home-flight-note {
  margin-top: 8px;
}

/* Inner pages share the home visual language without changing list/business semantics. */
.search-welcome { padding:40px 20px; text-align:center; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.search-welcome-art { display:flex; justify-content:center; gap:16px; margin-bottom:20px; }
.search-welcome-art img { width:52px; height:52px; padding:10px; border-radius:15px; background:var(--brand-soft); }
.search-welcome h2 { margin:0 0 10px; font-size:20px; }
.search-welcome p { margin:0; color:var(--muted); line-height:1.7; }
.search-compact-list .result-card { display:grid; grid-template-columns:88px minmax(0,1fr); align-items:stretch; min-height:112px; }
.search-compact-list .result-card > :is(img,.card-media,.merchant-cover,.job-cover,.job-symbol) { width:88px; height:100%; min-height:112px; max-height:160px; object-fit:cover; aspect-ratio:auto; border-radius:0; }
.search-compact-list .result-card .card-content { min-width:0; padding:12px; }
.search-compact-list .card-title-row { align-items:flex-start; flex-wrap:wrap; gap:4px 8px; }
.search-compact-list .card-title { font-size:15px; }
.search-compact-list .price { font-size:15px; }
.search-compact-list .card-description { -webkit-line-clamp:2; font-size:12px; }
.search-compact-list .card-meta { font-size: 12px; }
.search-compact-list .result-card.no-media { grid-template-columns:minmax(0,1fr); }
.search-compact-list .knowledge-card { padding:16px; }
.profile-pickup-link { display:flex; align-items:center; gap:14px; padding:18px; border:1px solid var(--line); border-radius:14px; color:var(--text); background:var(--surface); text-decoration:none; }
.profile-pickup-icon { width:48px; height:48px; flex-shrink:0; display:grid; place-items:center; border-radius:14px; color:var(--action-text); background:var(--brand-soft); }
.profile-pickup-link > span:nth-child(2) { min-width:0; flex:1; }
.profile-pickup-link strong,.profile-pickup-link small { display:block; overflow-wrap:anywhere; }
.profile-pickup-link small { color:var(--muted); font-size:12px; margin-top:5px; line-height:1.6; }
.detail-intro .card-title-row { flex-wrap:wrap; align-items:flex-start; }
.detail-intro .detail-title { flex-basis:100%; margin:0; }
.detail-highlights { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 16px; margin:20px 0 0; padding-top:18px; border-top:1px solid var(--line); }
.detail-highlight { min-width:0; }
.detail-highlight.is-primary { grid-column:1/-1; }
.detail-highlight dt { font-size:12px; color:var(--muted); margin-bottom:5px; }
.detail-highlight dd { margin:0; font-weight:600; overflow-wrap:anywhere; }
.detail-highlight.is-primary dd { color:var(--action-text); font-size:28px; line-height:1.35; }
.detail-section-title,.merchant-shortcuts h2 { margin:0 0 14px; font-size:15px; }
.merchant-shortcut-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.merchant-shortcut-grid > a { min-width:0; min-height:76px; padding:12px 6px; flex-direction:column; gap:7px; font-size:12px; line-height:1.6; text-align:center; text-decoration:none; white-space:normal; overflow-wrap:anywhere; }
.merchant-shortcut-grid .material-symbols-rounded { color:var(--action-text); }
.detail-action-dock > * { min-width:0; padding:12px 10px; white-space:normal; line-height:1.6; text-align:center; font-size:14px; }
.detail-action-dock :is(.button-label,span:not(.material-symbols-rounded)) { min-width:0; white-space:normal; overflow-wrap:anywhere; }
.detail-stack { padding-bottom:100px; }
.news-editorial { overflow:hidden; }
.news-editorial .news-link { display:flex; flex-direction:column; gap:0; padding:0; height:100%; }
.news-editorial .news-copy { min-width:0; padding:18px; }
.news-editorial .news-copy h2 { margin:8px 0 10px; font-size:18px; line-height:1.6; overflow-wrap:anywhere; }
.news-editorial .news-copy p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; color:var(--muted); font-size:14px; line-height:1.7; margin:0 0 16px; }
.news-cover { display:block; width:100%; height:180px; object-fit:cover; background:var(--surface-soft); }
.news-editorial .news-read-more { display:inline-flex; align-items:center; gap:8px; min-height:32px; }
.weather-current-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.weather-current-heading > div { min-width:0; }
.weather-current-temperature { display:block; font-size:48px; letter-spacing:-1.5px; font-weight:700; line-height:1.25; }
.weather-current-condition { margin:8px 0 18px; font-size:16px; }
.weather-current-art { width:112px; height:112px; flex-shrink:0; }
.weather-detail-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; border-top:1px solid var(--line); padding-top:18px; margin:0; }
.weather-detail-metrics > div { min-width:0; text-align:center; }
.weather-detail-metrics dt { color:var(--muted); font-size:12px; line-height:1.7; }
.weather-detail-metrics dd { margin:6px 0 0; font-weight:600; font-size:16px; overflow-wrap:anywhere; }
.weather-current-update { color:var(--muted); margin:18px 0 0; font-size: 12px; line-height:1.7; overflow-wrap:anywhere; }
.flight-schedule-note { display:flex; align-items:flex-start; gap:8px; color:var(--muted); font-size:12px; line-height:1.7; margin:0 0 18px; }
.flight-ticket { padding:20px; }
.flight-ticket > header { display:flex; justify-content:space-between; align-items:flex-end; gap:14px; }
.flight-time,.flight-identity { display:flex; flex-direction:column; min-width:0; gap:5px; }
.flight-time small { color:var(--muted); font-size: 12px; }
.flight-time > strong { color:var(--action-text); font-size:30px; line-height:1.3; font-variant-numeric:tabular-nums; }
.flight-identity { text-align:right; }
.flight-identity strong { font-size:15px; overflow-wrap:anywhere; }
.flight-identity time { font-size:12px; color:var(--muted); }
.flight-airports { display:grid; grid-template-columns:minmax(0,1fr) 50px minmax(0,1fr); gap:12px; align-items:center; padding:22px 0; }
.flight-airports > div { display:flex; flex-direction:column; min-width:0; gap:5px; }
.flight-airports > div:last-child { text-align:right; }
.flight-airports strong { font-size:24px; font-weight:700; letter-spacing:1px; }
.flight-airports > div > span { color:var(--muted); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.flight-route-line { display:grid; place-items:center; height:1px; background:var(--line); color:var(--action-text); }
.flight-route-line > span { padding:6px; background:var(--surface); box-sizing:content-box; }
.flight-ticket > footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding-top:14px; border-top:1px dashed var(--line); font-size:12px; color:var(--muted); }
@media(min-width:620px) { .news-editorial.has-cover .news-link { flex-direction:row; }.news-editorial.has-cover .news-cover { width:220px; height:200px; flex-shrink:0; }.news-editorial .news-copy { flex:1; } }
@media(max-width:360px) { .detail-action-dock > * { font-size:12px; padding:10px 6px; }.detail-action-dock .material-symbols-rounded { font-size:18px; }.weather-current-art { width:88px; height:88px; }.weather-current-temperature { font-size:40px; }.weather-detail-metrics dd { font-size:14px; }.flight-ticket { padding:16px; }.merchant-shortcut-grid { gap:6px; } }

.property-main-entry{background:color-mix(in srgb,var(--surface) 94%,#5b8651);border-color:var(--line)}.property-main-entry .healthcare-entry-icon{background:color-mix(in srgb,var(--surface) 80%,#5b8651);color:var(--text)}.property-main-entry .material-symbols-rounded{font-size:32px}


/* Shared shell refinement: explicit themes, service priority and readable labels. */
[hidden] { display: none !important; }
.page-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; border-radius: var(--radius-sm); }
input, select, textarea { font-size: 16px; }
.home-page .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-page .quick-action { flex-direction: column; justify-content: flex-start; align-items: center; padding: 12px 6px; gap: 8px; border-radius: var(--radius-md); text-align: center; }
.home-page .quick-action > .home-service-icon { flex: 0 0 44px; }
.home-service-copy strong { font-size: 14px; }
.home-page .home-service-copy small { display: none; }
.home-page .healthcare-entry { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background-color: var(--surface); }
.home-page .property-main-entry { background: color-mix(in srgb, var(--surface) 94%, #5b8651); }
.home-page .healthcare-entry-copy strong { font-size: 16px; }
.home-page .home-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
.home-overview :is(.home-weather,.home-flight) { min-height: 150px; padding: 12px; border-radius: var(--radius-md); }
.home-overview .home-card-label { flex-wrap: wrap; font-size: 12px; gap: 4px; line-height: 1.6; }
.home-overview .home-card-label > .material-symbols-rounded:last-child { display: none; }
.home-overview .home-weather-main { margin: 8px 0; gap: 4px; }
.home-overview .home-weather-reading strong { font-size: 28px; }
.home-overview .home-weather-reading > span { font-size: 12px; }
.home-overview .home-weather-art { width: 40px; height: 40px; flex: 0 0 40px; }
.home-overview .home-weather-footer { flex-wrap: wrap; gap: 4px; margin-top: 6px; font-size: 12px; }
.home-overview .home-flight-body { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; }
.home-overview .home-flight-route { width: 100%; grid-template-columns: auto 20px auto; gap: 4px; }
.home-overview .home-flight-route strong { font-size: 16px; white-space: nowrap; }
.home-overview .home-flight-route small { display: none; }
.home-overview .home-flight-line .material-symbols-rounded { font-size: 17px; padding: 0; }
.home-overview .home-flight-time { align-items: flex-start; gap: 4px; }
.home-overview .home-flight-time strong { font-size: 20px; white-space: nowrap; }
.home-overview .home-flight-time small { font-size: 12px; white-space: normal; }
.home-overview :is(.home-flight-note,.home-flight-empty > small) { font-size: 12px; margin-top: 8px; }
.home-overview .home-weather-unavailable { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.home-overview .home-weather-unavailable > img { width: 40px; height: 40px; flex-basis: 40px; }
.home-overview .home-weather-legacy .weather-lines { font-size: 12px; }
.home-page .home-banner-carousel { position: relative; }
.home-page .home-banner-caption { padding-bottom: 54px; }
.merchant-card .badge { flex-shrink: 0; }
.recruitment-list .job-card:not(.has-job-media) { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px; }
.recruitment-list .job-card:not(.has-job-media) .job-symbol { width: 36px; min-height: 36px; height: 36px; border-radius: var(--radius-sm); }
.recruitment-list .job-card:not(.has-job-media) .card-content { padding: 0; }
.weather-metric-icon { width: 18px; height: 18px; vertical-align: middle; flex-shrink: 0; }
.nav-item { font-size: 12px; line-height: 1.5; }
.nav-item > span:last-child { white-space: normal; overflow: visible; text-overflow: clip; }
.auth-state .primary-button { text-decoration: none; width: min(100%, 320px); justify-content: center; }
.auth-state .secondary-button { width: min(100%, 320px); justify-content: center; }
html[lang="km"] :is(.nav-item,.home-service-copy strong,.healthcare-entry-copy) { line-height: 1.8; }
@media (max-width: 375px) { .home-service-copy strong { font-size: 13px; } .home-overview .home-weather-reading strong { font-size: 25px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
:root[data-theme="light"] .badge { color: var(--accent); }
:root[data-theme="dark"] .home-service-icon img,
:root[data-theme="dark"] .healthcare-entry-icon img { filter: brightness(1.5) saturate(.85); }
