:root {
  color-scheme: light;
  --text: #1f2933;
  --muted: #637083;
  --border: #d9e0e7;
  --surface: #ffffff;
  --page: #f6f8fa;
  --accent: #256d4f;
  --accent-dark: #174d37;
  --blue: #1f6fb2;
  --amber: #b7791f;
  --red: #a43b36;
  --shadow: 0 8px 22px rgba(31, 41, 51, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--accent-dark);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 max(16px, calc((100vw - 1120px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.navlinks a {
  color: var(--text);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}

.navlinks a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.navlinks form {
  margin: 0;
}

.navlinks button,
.button,
.primary,
.text-link {
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 9px 13px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.text-link {
  display: inline-block;
}

.button:hover,
.primary:hover,
.text-link:hover,
.navlinks button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.hero {
  padding: 34px 0 28px;
}

.compact-hero {
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 2.75rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
  line-height: 1.22;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.content-grid,
.page-hero {
  display: grid;
  gap: 24px;
  align-items: start;
}

.button-row a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  text-align: center;
  font-weight: 800;
  text-decoration: none;
}

.button-row a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}

.country-button {
  position: relative;
  display: block;
  min-height: 235px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #e5ebef;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.country-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transition: transform .18s ease;
}

.country-button:hover .country-image {
  transform: scale(1.025);
}

.country-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 13px 16px;
  background: rgba(22, 31, 43, .9);
  color: #fff;
  font-size: 1.22rem;
  font-weight: 800;
}

.placeholder-1 {
  background:
    linear-gradient(rgba(31, 41, 51, .18), rgba(31, 41, 51, .1)),
    linear-gradient(135deg, #6aa47f, #c9b56a);
}

.placeholder-2 {
  background:
    linear-gradient(rgba(31, 41, 51, .18), rgba(31, 41, 51, .1)),
    linear-gradient(135deg, #5a8db3, #72a77f);
}

.placeholder-3 {
  background:
    linear-gradient(rgba(31, 41, 51, .18), rgba(31, 41, 51, .1)),
    linear-gradient(135deg, #b76f5f, #d2ad62);
}

.placeholder-4 {
  background:
    linear-gradient(rgba(31, 41, 51, .18), rgba(31, 41, 51, .1)),
    linear-gradient(135deg, #5f7582, #6d9ac3);
}

.page-backdrop {
  position: relative;
  margin: -32px calc((100vw - min(1120px, calc(100vw - 32px))) / -2) -56px;
  padding: 32px calc((100vw - min(1120px, calc(100vw - 32px))) / 2) 56px;
  isolation: isolate;
}

.page-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--page-bg);
  background-position: center;
  background-size: cover;
  opacity: .2;
}

.page-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(246, 248, 250, .9);
}

.page-hero {
  grid-template-columns: minmax(260px, 430px) 1fr;
  align-items: center;
  padding: 12px 0 30px;
}

.map-page {
  display: grid;
  gap: 16px;
}

.map-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.map-frame {
  width: 100%;
  height: min(76vh, 820px);
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #111827;
}

.banner {
  min-height: 255px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.content-grid {
  grid-template-columns: 1fr 320px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.section-heading a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

article,
.info-panel,
.login-panel,
.admin-page {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 20px;
}

.info-panel {
  background: #fbfcfd;
}

.city-list,
.post-grid,
.post-list,
.landmark-list {
  display: grid;
  gap: 14px;
}

.city-list {
  margin-bottom: 24px;
}

.city-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  text-decoration: none;
}

.city-card:hover {
  border-color: var(--accent);
}

.city-thumb {
  min-height: 88px;
  border-radius: 4px;
  background-position: center;
  background-size: cover;
}

.muted,
.empty,
.field-note {
  color: var(--muted);
}

.field-note {
  margin: -4px 0 0;
  font-size: .92rem;
}

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

.post-grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landmark-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: center;
}

.landmark-image {
  min-height: 96px;
  border-radius: 6px;
  background-position: center;
  background-size: cover;
}

.travel-details {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.travel-details div {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.travel-details dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.travel-details dd {
  margin: 2px 0 0;
}

.post-card {
  min-width: 0;
}

.post-card h3 {
  margin-top: 10px;
}

.post-card p {
  color: var(--muted);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-meta time,
.post-scope {
  color: var(--muted);
  font-size: .9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .78rem;
  font-weight: 800;
}

.badge-news {
  background: #e7f1fb;
  color: var(--blue);
}

.badge-announcement {
  background: #fff3d6;
  color: var(--amber);
}

.badge-event {
  background: #e7f4ed;
  color: var(--accent-dark);
}

.badge-pinned {
  background: #f9e5e3;
  color: var(--red);
}

.login-panel {
  width: min(430px, 100%);
  margin: 48px auto;
}

.login-panel form,
.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form.compact {
  max-width: 520px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 109, 79, .22);
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-subsection {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

table {
  width: 100%;
  margin-bottom: 22px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .88rem;
  text-transform: uppercase;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.actions form {
  margin: 0;
}

.danger,
.link-danger {
  border: 1px solid var(--red);
  border-radius: 6px;
  background: #fff;
  color: var(--red);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.danger {
  padding: 10px 12px;
}

.link-danger {
  padding: 0;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.drop-zone {
  min-height: 150px;
  place-content: center;
  border: 2px dashed #aeb8c2;
  border-radius: 6px;
  background: #fbfcfd;
  text-align: center;
  cursor: pointer;
}

.drop-zone strong {
  color: var(--text);
  font-size: 1rem;
}

.drop-zone small,
.drop-zone::after {
  color: var(--muted);
}

.drop-zone::after {
  content: attr(data-file);
  min-height: 1.2em;
  font-size: .9rem;
}

.drop-zone input[type="file"] {
  display: none;
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #eef7f2;
}

.upload-preview {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.remove-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--red);
  font-size: .9rem;
}

.remove-image input {
  width: auto;
}

.error {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 860px) {
  .topbar,
  .admin-header,
  .map-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .country-grid,
  .page-hero,
  .content-grid,
  .post-grid,
  .post-grid.wide,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .country-button {
    min-height: 215px;
  }

  .city-card {
    grid-template-columns: 1fr;
  }

  .landmark-card {
    grid-template-columns: 1fr;
  }

  .banner {
    min-height: 210px;
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 22px, 1120px);
  }

  .topbar {
    padding: 12px 11px;
  }

  .navlinks {
    width: 100%;
    gap: 10px 14px;
  }

  .navlinks a {
    font-size: .93rem;
  }

  h1 {
    font-size: 1.95rem;
  }

  .country-label {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 1.08rem;
  }
}
