body {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.8;
  color: #333;
  background-color: #f4f1e2;
  margin: 0;
  padding: 40px 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

h1, h2 {
  font-weight: 700;
  color: #4a4a4a;
  border-bottom: 2px solid #ead3c3;
  padding-bottom: 0.5em;
}

h1 {
  font-size: 2.2em;
  display: flex;
  align-items: center;
}

h1 .icon {
  font-size: 0.9em;
  margin-right: 20px;
  color: #ea9b8a;
}

h2 {
  font-size: 1.6em;
  margin-top: 50px;
}

h3 {
  font-size: 1.3em;
  color: #4a4a4a;
  margin-top: 30px;
}

p, ul, li {
  font-size: 1.05em;
}

ul {
  padding-left: 25px;
}

li {
  margin-bottom: 12px;
}

strong {
  color: #d9534f;
  font-weight: 700;
}

.reading {
  font-size: 1.1em;
  margin-top: 10px;
  color: #666;
}

.demo-section {
  text-align: center;
  margin-top: 30px;
  padding: 40px;
  background-color: #f9f7ef;
  border-radius: 8px;
}

.demo-section p {
  font-size: 1.2em;
}

.demo-button {
  font-size: 1.2em;
  padding: 15px 35px;
  border: none;
  border-radius: 8px;
  background-color: #ea9b8a;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.demo-button:hover {
  background-color: #e08a7a;
  transform: translateY(-2px);
}

#demo-message {
  margin-top: 25px;
  font-size: 1.5em;
  font-weight: bold;
  min-height: 1.5em;
}

/* --- Accordion & Code Highlight Styles --- */
details {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-top: 20px;
  overflow: hidden; /* for border-radius */
}

summary {
  font-size: 1.1em;
  font-weight: bold;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none; /* Remove default marker */
  display: block;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

details[open] summary {
  border-bottom: 1px solid #e0e0e0;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background-color: #f2f2f2;
}

.code-example {
  background-color: #1e1e1e; /* VS Code Dark Theme BG */
  color: #d4d4d4;
  padding: 20px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  overflow-x: auto;
}

.code-example pre {
  margin: 0;
}

.code-example code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
  white-space: pre;
}

/* Syntax Highlight Colors */
.code-example .token.comment { color: #6A9955; } /* Green */
.code-example .token.keyword { color: #C586C0; } /* Pink/Purple */
.code-example .token.function { color: #DCDCAA; } /* Yellow */
.code-example .token.string { color: #CE9178; } /* Orange */
.code-example .token.variable { color: #9CDCFE; } /* Light Blue */
.code-example .token.punctuation { color: #d4d4d4; } /* Default color */

.footer-nav {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.footer-nav a {
  color: #4a4a4a;
  text-decoration: none;
  font-weight: bold;
  margin: 0 15px;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  body {
    padding: 15px 10px; /* Slightly less vertical padding */
  }

  .container {
    padding: 20px 15px; /* Reduce container padding for smaller screens */
  }

  h1 {
    font-size: 1.8em;
  }

  h1 .icon {
    margin-right: 10px; /* Slightly reduce margin */
  }

  h2 {
    font-size: 1.4em;
    margin-top: 30px; /* Reduce top margin for sections */
  }

  h3 {
    font-size: 1.2em; /* Adjust h3 for mobile */
    margin-top: 20px;
  }

  p, ul, li {
    font-size: 1em; /* Slightly smaller font for body text on mobile */
    line-height: 1.7; /* Adjust line height for better readability */
  }

  .reading {
    font-size: 1em; /* Adjust reading font size */
  }

  .demo-section {
    padding: 25px 15px; /* Adjust padding for demo section */
  }

  .demo-section p {
    font-size: 1.1em; /* Adjust demo section paragraph font size */
  }

  .demo-button {
    width: 100%;
    padding: 12px 15px; /* Slightly reduce button padding */
    font-size: 1.1em; /* Adjust button font size */
  }

  #demo-message {
    font-size: 1.3em; /* Adjust demo message font size */
  }

  summary {
    font-size: 1em; /* Adjust summary font size */
    padding: 12px 15px;
  }

  .code-example {
    padding: 15px; /* Adjust code example padding */
  }

  .code-example code {
    font-size: 0.9em; /* Slightly smaller code font */
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 15px; /* Adjust table cell padding */
    font-size: 0.95em; /* Adjust table text size */
  }

  .footer-nav a {
    margin: 0 10px; /* Adjust footer link spacing */
  }
}

/* --- Related Comparison Table --- */
.term-comparison {
  margin-top: 50px;
}

.comparison-table {
  margin-top: 20px;
  overflow-x: auto;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
  background-color: #f9f9f9;
  font-weight: bold;
  font-size: 1.1em;
  color: #4a4a4a;
}

.comparison-table td {
  font-size: 1.05em;
  line-height: 1.6;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover {
  background-color: #f9f7ef;
}

/* Term name styling with theme color */
.comparison-table .term-name {
  font-weight: bold;
  color: #666; /* 読み方の色と統一 */
  text-decoration: none;
  transition: color 0.3s ease;
}

.comparison-table .term-name:hover {
  color: #4a4a4a;
  text-decoration: underline;
}

.comparison-table .term-name[href=""] {
  color: #666;
  cursor: default;
  text-decoration: none;
}

.comparison-table .term-name[href=""]:hover {
  color: #666;
  text-decoration: none;
}

blockquote {
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  border-left: 4px solid #ccc;
  color: #666;
  font-size: 0.95em;
}
