:root {
  --bg: #f4f0e8;
  --panel: #fffdf9;
  --panel-border: #d8cbb6;
  --text: #2d241d;
  --muted: #6f6255;
  --accent: #8b3a2e;
  --accent-soft: #ead7cf;
  --danger: #8b2e2e;
  --shadow: 0 18px 40px rgba(70, 52, 33, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(139, 58, 46, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f3ea 0%, var(--bg) 100%);
  color: var(--text);
  font: 16px/1.6 Georgia, "Times New Roman", serif;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.site-header,
.site-nav,
.panel,
.site-footer {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 20px 24px;
  border-radius: 20px 20px 0 0;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}

.auth-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-user {
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 24px;
  border-top: 0;
  border-bottom: 0;
}

main {
  display: grid;
  gap: 20px;
  padding-top: 20px;
}

.panel {
  padding: 24px;
  border-radius: 20px;
}

#map-create-place-form {
  scroll-margin-top: 24px;
}

#map {
  height: 560px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.muted {
  color: var(--muted);
}

.language {
  display: inline-block;
  padding: 1px 7px;
  margin: 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  vertical-align: middle;
}

.notice {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #fff7ef;
}

.notice.error {
  border-color: #d8aaaa;
  background: #fff0f0;
}

.text-header .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.prose p:first-child,
.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.smallcaps {
  font-variant: small-caps;
  letter-spacing: 0.06em;
}

.image-text img {
  max-width: 100%;
  height: auto;
  display: block;
}

.narrow {
  width: min(560px, 100%);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9bdaa;
  border-radius: 10px;
  background: #fffdfa;
  color: var(--text);
}

button {
  width: fit-content;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
}

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

.site-footer {
  margin-top: 20px;
  padding: 16px 24px;
  border-radius: 0 0 20px 20px;
}

@media (max-width: 800px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
  }

  .site-header,
  .hero {
    flex-direction: column;
  }

  .hero-meta {
    min-width: 0;
    text-align: left;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  #map {
    height: 420px;
  }
}
