:root {
  --bg: #f7f4ef;
  --paper: #fffdfa;
  --text: #1f1c18;
  --muted: #6b655d;
  --line: #d9d2c8;
  --line-strong: #c6bbae;
  --accent: #7a2926;
  --accent-dark: #5d1c1a;
  --accent-soft: #f2e8e5;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.52;
}
button, input { font: inherit; }
a { color: inherit; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--text);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 239, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  line-height: 1.05;
}
.brand-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .045em;
}
.brand-subtitle {
  margin-top: .22rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .69rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--sans);
  font-size: .88rem;
}
.nav-rubric {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .48rem .74rem;
  border: 1px solid #e2dbd1;
  border-radius: 9px;
  background: rgba(255, 253, 250, .58);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.nav-rubric::-webkit-details-marker { display: none; }
.nav-rubric:hover,
.nav-rubric:focus-visible,
.nav-dropdown[open] > .nav-rubric {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--accent);
  outline: none;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown > summary::after {
  content: "";
  width: .42rem;
  height: .42rem;
  margin-top: -.18rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.nav-dropdown[open] > summary::after {
  margin-top: .18rem;
  transform: rotate(225deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + .45rem);
  left: 0;
  z-index: 50;
  min-width: 230px;
  max-height: min(68vh, 520px);
  overflow: auto;
  padding: .42rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(42, 31, 20, .09);
}
.nav-dropdown-menu-right {
  left: auto;
  right: 0;
}
.nav-dropdown-menu a {
  display: block;
  padding: .58rem .66rem;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.25;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-dark);
  outline: none;
}
.nav-dropdown-menu > a:first-child {
  margin-bottom: .25rem;
  color: var(--accent);
  font-weight: 650;
}

.menu-button {
  display: none;
  padding: .48rem .78rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: .88rem;
  cursor: pointer;
}

.hero {
  padding: 3.2rem 0 1.5rem;
  text-align: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.45rem);
  line-height: 1;
  letter-spacing: -.018em;
}
.hero-subtitle {
  margin: .72rem 0 1.55rem;
  font-size: clamp(1.02rem, 1.9vw, 1.34rem);
  font-style: italic;
  font-weight: 700;
}
.hero-copy {
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
  font-size: clamp(1rem, 1.5vw, 1.09rem);
}

.search-wrap {
  max-width: 960px;
  margin: 1.75rem auto 0;
  text-align: left;
}
.search-wrap label {
  display: block;
  margin-bottom: .45rem;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 650;
}
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: start;
}
.search-box { position: relative; }
.search-box::before {
  content: "⌕";
  position: absolute;
  left: .9rem;
  top: .86rem;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: .82rem 1rem .82rem 2.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--text);
  outline: none;
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 41, 38, .09);
}
.search-reset {
  min-height: 47px;
  padding: .72rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 650;
  cursor: pointer;
}
.search-reset:hover { border-color: var(--accent); }

.suggestions {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + .35rem);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(42, 31, 20, .08);
}
.suggestion-item {
  display: block;
  width: 100%;
  padding: .72rem .9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover,
.suggestion-item[aria-selected="true"] { background: var(--accent-soft); }
.suggestion-title { display: block; font-weight: 700; }
.suggestion-meta {
  display: block;
  margin-top: .12rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .76rem;
}

.content {
  padding: .9rem 0 4.5rem;
}
.catalog-section {
  margin-top: 2.4rem;
  scroll-margin-top: 88px;
}
.section-heading {
  margin-bottom: .95rem;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  line-height: 1.1;
}

.group-block {
  margin-top: 1.25rem;
  scroll-margin-top: 88px;
}
.group-title {
  margin: 0 0 .48rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.record-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
}
.record-table thead th {
  padding: .66rem .86rem;
  border-bottom: 1px solid var(--line);
  background: #faf7f2;
  color: var(--muted);
  text-align: left;
  font-family: var(--sans);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.record-table tbody td {
  padding: .86rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.record-table tbody tr:last-child td { border-bottom: 0; }
.record-table tbody tr:hover { background: #fffaf6; }
.col-day { width: 31%; }
.col-detail { width: 53%; }
.col-pdf { width: 16%; }
.record-table thead th.col-pdf { text-align: center; }
.day-name {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.28;
}
.entry-title {
  margin: 0 0 .14rem;
  font-size: .99rem;
  font-weight: 700;
}
.entry-description {
  margin: 0;
  color: var(--muted);
}
.meta-line {
  margin-top: .38rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .78rem;
}
.meta-line span + span::before {
  content: "·";
  margin: 0 .36rem;
}
.pdf-cell {
  text-align: center;
  vertical-align: middle !important;
}
.pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: .65rem .8rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: .87rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.pdf-button:hover,
.pdf-button:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.empty-state,
.status {
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--sans);
}
.status-error {
  border-color: #d1aaa5;
  background: #fff6f4;
  color: #7a2421;
}

.site-footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .82rem;
}
.footer-inner p { margin: 0; }

mark {
  background: #f1dfb8;
  color: inherit;
  padding: 0 .05em;
}

@media (max-width: 940px) {
  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .main-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 62px;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .5rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 14px 30px rgba(42, 31, 20, .08);
  }
  .main-nav.open { display: flex; }
  .nav-rubric {
    width: 100%;
    justify-content: space-between;
  }
  .nav-dropdown-menu,
  .nav-dropdown-menu-right {
    position: static;
    max-height: none;
    margin: .15rem 0 .4rem;
    padding: .25rem 0 .25rem .55rem;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .nav-dropdown-menu a { padding: .5rem .62rem; }
}

@media (max-width: 760px) {
  .record-table thead { display: none; }
  .record-table,
  .record-table tbody,
  .record-table tr,
  .record-table td {
    display: block;
    width: 100%;
  }
  .record-table tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }
  .record-table tbody td {
    padding: .42rem .85rem;
    border-bottom: 0;
  }
  .record-table tbody td:first-child { padding-top: .78rem; }
  .record-table tbody td:last-child { padding-bottom: .82rem; }
  .pdf-cell { text-align: left; }
  .pdf-button { min-width: 86px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1080px); }
  .header-inner { min-height: 66px; }
  .brand-title { font-size: .96rem; }
  .brand-subtitle { font-size: .64rem; }
  .hero { padding-top: 2.5rem; }
  .hero-copy { font-size: .98rem; }
  .search-row { grid-template-columns: 1fr; }
  .search-reset { min-height: 44px; }
  .content { padding-top: .6rem; }
}

@media print {
  .site-header, .search-wrap, .site-footer { display: none !important; }
  body { background: #fff; }
  .record-table { border-color: #bbb; }
}
