:root {
  --ink: #202332;
  --muted: #667085;
  --cream: #f8f2e8;
  --paper: #fffdf8;
  --wine: #752f45;
  --wine-dark: #482033;
  --blue: #162844;
  --gold: #c39449;
  --line: #e8dfd2;
  --shadow: 0 18px 50px rgba(35, 25, 30, 0.1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.65;
}
h1,
h2,
h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.2;
  color: var(--blue);
}
h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  max-width: 850px;
}
h2 {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
}
a {
  color: var(--wine);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--wine-dark);
}
button,
.button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 46px;
}
.button.secondary {
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--wine);
}
.button.light {
  background: #fff;
  color: var(--wine-dark);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e1ad53;
  outline-offset: 3px;
}
.shell {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  background: #fff;
  padding: 10px;
}
.skip-link:focus {
  left: 10px;
  z-index: 10;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Libre Baskerville", serif;
  font-weight: 700;
  line-height: 1;
}
.brand > span:last-child {
  font-size: 1.05rem;
}
.brand > span:last-child > span {
  color: var(--wine);
}
.brand small {
  display: block;
  font:
    500 0.65rem "DM Sans",
    sans-serif;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.brand-mark {
  color: var(--gold);
  font-size: 1.8rem;
}
nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink);
}
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 48px 0 22px;
  background: #f2e9dc;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 35px;
}
.footer-grid a {
  display: block;
  margin: 5px 0;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}
.hero {
  padding: 90px 0 70px;
  background:
    radial-gradient(circle at 78% 20%, #f0dfc2 0 12%, transparent 35%),
    linear-gradient(135deg, #fffdf8, #f5ebdc);
}
.eyebrow {
  color: var(--wine);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 670px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.section {
  padding: 68px 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 25px;
}
.section-heading p {
  color: var(--muted);
  max-width: 560px;
}
.category-grid,
.story-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card,
.story-card,
.paper,
.notice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.category-card {
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-card:hover,
.story-card:hover {
  transform: translateY(-3px);
  transition: transform 0.2s;
}
.category-icon {
  font-size: 2rem;
  color: var(--gold);
}
.category-card h3 {
  font-size: 1.2rem;
  margin: 14px 0 3px;
}
.category-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.story-grid {
  grid-template-columns: repeat(3, 1fr);
}
.story-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 270px;
}
.story-card .card-icon {
  color: var(--gold);
  font-size: 1.6rem;
}
.story-card h3 {
  font-size: 1.2rem;
  margin: 12px 0 8px;
}
.story-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 16px;
}
.story-card .card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.breadcrumb {
  padding-top: 30px;
  font-size: 0.87rem;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--muted);
}
.paper {
  padding: clamp(25px, 5vw, 58px);
  max-width: 850px;
  margin: 36px auto;
}
.story-body {
  max-width: 700px;
  margin: auto;
}
.story-body p {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.08rem;
  line-height: 2;
  margin: 1.5rem 0;
}
.story-cover {
  text-align: center;
  padding: 55px 20px;
  background: linear-gradient(135deg, var(--blue), var(--wine-dark));
  color: #fff;
  border-radius: 18px;
  margin-bottom: 28px;
}
.story-cover h1,
.story-cover p {
  color: #fff;
}
.story-cover h1 {
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  margin: 10px auto;
}
.photo-frame {
  margin: 30px auto;
  border: 10px solid #fff;
  box-shadow: var(--shadow);
  max-width: 780px;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  background: #fff;
  border: 1px solid #cfc5b9;
  border-radius: 10px;
  padding: 0.8rem;
  color: var(--ink);
}
.field small,
.hint {
  color: var(--muted);
  font-size: 0.84rem;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
}
.check input {
  margin-top: 5px;
  accent-color: var(--wine);
}
.error,
.notice {
  padding: 15px;
  margin: 16px 0;
}
.error {
  border: 1px solid #b53b4d;
  background: #fff0f2;
  color: #7b1d2a;
}
.notice {
  box-shadow: none;
}
.notice.success {
  background: #eaf5ec;
  border-color: #b9d9be;
}
.notice.warn {
  background: #fff7df;
  border-color: #e8cf82;
}
.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f3eadc;
  padding: 10px;
  border-radius: 12px;
}
.link-box input {
  flex: 1;
  padding: 10px;
  border: 0;
  background: transparent;
  min-width: 0;
}
.hero-dark {
  background: var(--blue);
  color: #fff;
  padding: 70px 0;
}
.hero-dark h1,
.hero-dark p {
  color: #fff;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 30px;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  text-decoration: none;
  background: var(--paper);
  font-size: 0.88rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.admin-table th,
.admin-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
}
.admin-table th {
  color: var(--muted);
  font-size: 0.8rem;
}
.private-banner {
  background: #f2dfbc;
  padding: 13px;
  text-align: center;
  font-size: 0.9rem;
}
.small {
  font-size: 0.88rem;
  color: var(--muted);
}
@media (max-width: 850px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .story-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  nav {
    gap: 10px;
  }
  nav a {
    font-size: 0.8rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .shell {
    width: min(100% - 28px, 1160px);
  }
  .header-inner {
    align-items: flex-start;
    padding: 16px 0;
  }
  .header-inner nav {
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }
  .hero {
    padding: 55px 0;
  }
  .category-grid,
  .story-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 45px 0;
  }
  .paper {
    padding: 22px;
  }
  .story-body p {
    font-size: 1rem;
    line-height: 1.85;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .link-box {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
