:root {
  color-scheme: light dark;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  --accent-color: #c5487b;
  --accent-light: #fde8f1;
  --accent-light-strong: #f6c2d9;
  --border-color: #e0d7db;
  --text-subtle: #5c6b7a;
}

body {
  margin: 0;
  background: #f7f7f8;
  color: #1b1b1f;
}

header,
footer {
  background: #003049;
  color: #ffffff;
  padding: 1.25rem 2rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.title-visual {
  text-align: center;
  margin-bottom: 1rem;
}

.title-visual .title-icon {
  width: 80%;
  max-width: 600px;
  height: auto;
}

.generated-info {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  opacity: 0.85;
}

.header-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.link-button {
  display: inline-block;
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  background: var(--accent-color);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.link-button:hover,
.link-button:focus {
  background: #8f3257;
  transform: translateY(-1px);
}

.link-button--outline {
  background: #ffffff;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.link-button--outline:hover,
.link-button--outline:focus {
  background: var(--accent-color);
  color: #ffffff;
}

main {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 9rem);
}

nav#commitment-list {
  min-width: 18rem;
  max-width: 22rem;
  border-right: 1px solid var(--border-color);
  background: #ffffff;
  padding: 1rem;
  overflow-y: auto;
}

nav#commitment-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

nav#commitment-list button {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--accent-light);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

nav#commitment-list button:hover,
nav#commitment-list button:focus {
  outline: none;
  border-color: var(--accent-color);
  background: #fbd3e3;
  color: #4a1c30;
}

nav#commitment-list button.active {
  border-color: var(--accent-color);
  background: var(--accent-light-strong);
  color: #4a1c30;
}

#commitment-detail {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

#commitment-detail h2 {
  margin-top: 0;
}

#commitment-detail .commitment-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.commitment-icon {
  display: block;
  width: 50%;
  max-width: 360px;
  margin: 1rem auto;
  height: auto;
}

ol.requirements {
  padding-left: 1.25rem;
}

ol.requirements li {
  margin-bottom: 0.5rem;
}

.requirement-id {
  font-weight: 700;
  display: inline-block;
  min-width: 3rem;
  color: var(--accent-color);
}

.legacy {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.legacy h4 {
  margin-top: 0;
}

.legacy h5 {
  margin: 1.5rem 0 0.5rem;
  color: var(--accent-color);
  font-size: 1rem;
}

.legacy-intro,
.legacy-content {
  background: #f5f7fa;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e1e4e8;
  margin-bottom: 1rem;
}

.legacy-content ul,
.legacy-content ol {
  padding-left: 1.5rem;
}

.legacy-content li + li,
.legacy-intro p + p {
  margin-top: 0.5rem;
}

.legacy-content strong,
.legacy-intro strong {
  font-weight: 700;
}

.placeholder {
  margin: 0;
  color: var(--text-subtle);
}

footer {
  font-size: 0.85rem;
}

footer a,
.legacy-content a,
.legacy-intro a {
  color: var(--accent-color);
  text-decoration: underline;
}

footer a:hover,
footer a:focus,
.legacy-content a:hover,
.legacy-content a:focus,
.legacy-intro a:hover,
.legacy-intro a:focus {
  color: #8f3257;
}

@media (max-width: 960px) {
  main {
    flex-direction: column;
  }

  nav#commitment-list {
    max-width: none;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}
