/* Shared public layout. Feature styles keep their own reading and game rules. */
:root {
  --text-secondary: var(--muted);
  --accent-text: #416b7d;
}
.site-header {
  height: auto;
  min-height: 82px;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-header nav {
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-header nav a.active {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.skip-link {
  position: absolute;
  z-index: 100;
  left: 20px;
  top: -100px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
}
.skip-link:focus {
  top: 8px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
main {
  min-width: 0;
}
h1,
h2,
h3,
.prose,
.novel-description,
.section-aside {
  overflow-wrap: anywhere;
}
.article h1,
.novel-page h1,
.reader-heading h1 {
  margin: 0;
  font: 600 clamp(2rem, 4.5vw, 3.5rem)/1.2 var(--serif);
  letter-spacing: -0.035em;
}
.prose img {
  max-width: 100%;
  height: auto;
}
.prose pre {
  max-width: 100%;
  overflow-x: auto;
}
.site-footer {
  gap: 16px;
  align-items: center;
}
.site-footer a {
  color: var(--muted);
  text-underline-offset: 4px;
}
.site-status {
  color: var(--muted);
  padding: 16px 0;
  margin: 0;
}
.retry-button,
.filter-reset {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--accent-text);
  background: var(--surface);
  border: 1px solid var(--line);
  font: 13px var(--sans);
}
.retry-button {
  margin-left: 12px;
}
.filter-reset {
  margin-bottom: 8px;
}
.filter-reset[hidden] {
  display: none;
}
.tag-button {
  min-height: 36px;
}
.tag-button[aria-pressed='true'] {
  font-weight: 600;
}
.novel-directory a.active {
  background: var(--panel);
  color: var(--accent-text);
  box-shadow: inset 3px 0 var(--accent);
}
.novel-navigation a {
  min-height: 44px;
  overflow-wrap: anywhere;
}
.reader-heading .back {
  margin-bottom: 16px;
}
@media (max-width: 800px) {
  .site-header {
    min-height: 76px;
    gap: 4px 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .site-header nav {
    gap: 16px;
  }
  .brand {
    white-space: nowrap;
  }
  .site-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
