:root {
  color-scheme: light;
  --paper: #f4f1ed;
  --line: #d7ccc2;
  --muted: #7a675b;
  --clay: #805b42;
  --cream: #fffaf6;
  --shadow: 0 18px 48px rgba(33, 27, 23, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(128, 91, 66, 0.13), transparent 32rem),
    linear-gradient(180deg, #fffaf6 0%, var(--paper) 46%, #ebe5de 100%);
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(215, 204, 194, 0.9);
  background: rgba(255, 250, 246, 0.92);
  backdrop-filter: blur(16px);
}

nav {
  width: min(1240px, calc(100% - 28px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

nav a {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

nav a:hover,
nav a:focus-visible,
nav a.active {
  outline: none;
  color: var(--cream);
  border-color: rgba(128, 91, 66, 0.25);
  background: var(--clay);
}

main {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) 0;
}

.page {
  margin: 0 0 clamp(14px, 2.4vw, 30px);
}

.page:last-child {
  margin-bottom: 0;
}

.page img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  nav {
    width: min(100% - 14px, 1240px);
    min-height: 62px;
    justify-content: flex-start;
    gap: 7px;
  }

  nav a {
    min-height: 38px;
    padding: 10px 13px;
    font-size: 0.88rem;
  }

  main {
    width: min(100% - 14px, 1240px);
    padding: 7px 0;
  }
}
