/** ManaBase の公開文書を、単独URLでも読みやすく表示する。 */
:root {
  --warning: var(--gold);
  --warning-soft: var(--gold-soft);
  --radius: var(--radius-md);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-deep); }

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: #263f5e;
  background: #edf2f6;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.document-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.document-header__inner {
  display: flex;
  width: min(100% - 32px, 960px);
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.document-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-family: "Georgia", serif;
  font-size: 1.5rem;
  font-weight: 850;
  text-decoration: none;
}

.document-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.document-nav a {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.document-nav a[aria-current="page"],
.document-nav a:hover { color: var(--brand); }

.document-main {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: clamp(32px, 7vw, 68px) 0;
}

.document-main h1,
.document-main h2 { line-height: 1.4; }

.document-main h1 {
  margin: 0;
  color: var(--brand-deep);
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.document-main h2 {
  margin: 0 0 14px;
  color: var(--brand-deep);
  font-size: clamp(1.15rem, 3vw, 1.42rem);
}

.document-main p,
.document-main li { overflow-wrap: anywhere; }

.document-lead {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.document-section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.document-section p { margin: 0 0 14px; }
.document-section ul { padding-left: 1.35em; margin: 0 0 14px; }
.document-section li + li { margin-top: 7px; }

.document-table-wrapper {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--paper);
}

.document-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  text-align: left;
}

.document-table th,
.document-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.document-table th { color: var(--brand-deep); background: #eef4ee; }
.document-table tr:last-child td { border-bottom: 0; }

.warning {
  padding: 14px 16px;
  border-left: 4px solid var(--warning);
  border-radius: 4px;
  background: var(--warning-soft);
}

.document-footer {
  padding: 26px 16px 34px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
}

.document-footer p { margin: 0; }

@media (max-width: 640px) {
  .document-header__inner { align-items: flex-start; flex-direction: column; gap: 8px; padding: 15px 0; }
  .document-nav ul { justify-content: start; }
  .document-main { width: min(100% - 28px, 860px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .document-header,
  .document-footer { display: none; }
  .document-main { width: auto; padding: 0; }
  body { color: #000; background: #fff; }
}
