/* Design tokens; the defaults are the "Giấy" theme, the colours of the first NhaTrang.Wiki.
   Every colour on both sites comes from these variables, so a theme is just
   a different set of values (generated into /theme.css later). No hard-coded colours below. */
:root {
  --color-bg: #f8f7f3;
  --color-surface: #ffffff;
  --color-text: #243d37;
  --color-muted: #626e65;
  --color-border: #dce1d7;
  --color-primary: #b7482f;
  --color-on-primary: #ffffff;
  --color-danger: #a32c25;
  --color-notice-bg: #eeeee6;
  --color-notice-text: #243d37;
  /* Navigation retains its original blue independently of the site's accent. */
  --map-route-line: #3b82f6;
  --map-route-casing: #0b57d0;
  --map-route-label: var(--map-route-casing);
  --radius: 12px;
  --space: 16px;
  --shadow-small: 0 2px 8px rgb(0 0 0 / 15%);
  --shadow: 0 8px 28px rgb(16 34 29 / 22%);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  /* Always the light colours, whatever the device prefers (the owner's choice, 18/10/2026). */
  color-scheme: light;
}

html[data-color-mode='dark'] {
  --map-route-label: var(--map-route-line);
}

* {
  box-sizing: border-box;
}
/* A layout rule such as display: grid must never reveal an element the page has hidden. */
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}
.bar {
  display: flex;
  align-items: center;
  gap: var(--space);
  flex-wrap: wrap;
  padding: 12px var(--space);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.brand {
  font-weight: 700;
  margin-right: auto;
  color: var(--color-text);
  text-decoration: none;
}
.brand b {
  color: var(--color-primary);
}
.button,
select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.button.primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space);
}
.notice {
  background: var(--color-notice-bg);
  color: var(--color-notice-text);
  padding: 12px var(--space);
  border-radius: var(--radius);
}
.error {
  color: var(--color-danger);
}
.muted {
  color: var(--color-muted);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
