body {
  background-color: #111;
  color: #ddd;
  font-family: "Yu Gothic", "Helvetica Neue", sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 2rem;
  box-sizing: border-box; /* ←追加！ */
}

*, *::before, *::after {
  box-sizing: inherit;
}

h1 {
  font-size: 2.5rem;
  color: #ffcc00;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 2px 2px #000, -2px 2px #000, 2px -2px #000, -2px -2px #000;
  border: 3px double #ffcc00;
  padding: 1rem;
  background: linear-gradient(to bottom, #222, #111);
  display: inline-block;
  width: 100%;
}

h2 {
  font-size: 1.5rem;
  color: #ffcc00;
  margin-top: 2rem;
  border-left: 5px solid #ffcc00;
  padding-left: 0.5rem;
}

h3 {
  display: inline-block;
  font-size: 1.2rem;
  color: #66ccff;
  border-left: 3px solid #66ccff;
  padding-left: 0.6rem;
  margin: 1.2rem 0 0.8rem;
}

h3.fancy {
  display: block;
  font-size: 1.2rem;
  color: #ffcc00;
  background: linear-gradient(to right, #222, #111);
  padding: 0.4rem 0.6rem;
  border: 1px solid #ffcc00;
  border-radius: 4px;
  display: inline-block;
  margin: 1rem 0;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 1rem 0;
}

.color-item {
  text-align: center;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 4px;
  color: #fff;
  font-size: 0.9rem;
}

.music-buttons {
  text-align: center;
  margin: 1em 0;
}
.music-buttons button {
  padding: 0.5em 1em;
  margin: 0.3em;
  font-size: 1rem;
  background-color: #222;
  color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.music-buttons button:hover {
  background-color: #444;
}

p {
  margin: 1rem 0;
}

.small-note {
  font-size: 0.9rem;
  color: #aaa;
}

.article-title {
  font-size: clamp(1.4rem, 2vw + 1rem, 1.8rem);
  font-weight: 600;
  color: #66ccff;
  margin: 1rem 0;
  line-height: 1.4;
}

a {
  color: #66ccff;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid #444;
  margin: 2rem 0;
}

.toc {
  margin: 0 auto;
  max-width: 780px;
  background: #222;
  border: 1px solid #555;
  padding: 1.5rem;
  border-radius: 8px;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin: -0.5rem 0 1rem 1rem;
}

.toc li {
  margin: 0.8rem 0;
  font-size: 1.1rem;
}
.nav-links {
  text-align: center;
  margin-top: 3rem;
  font-size: 1.2rem;
}

.nav-links a {
  margin: 0 1rem;
}

.home-link {
  text-align: left;
  margin-bottom: 1rem;
}

.home-link a {
  color: #66ccff;
  font-size: 1.1rem;
  text-decoration: underline;
}

.home-link a:hover {
  text-decoration: none;
}

.screenshot {
  margin: 2rem 0;
  text-align: center;
}

.screenshot img {
  max-width: 100%;
  height: auto;
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.caption {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 0.5rem;
}
.image-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.image-col {
  flex: 1 1 300px; /* 最小幅300px、スマホなら折り返しOK */
  text-align: center;
}

.image-col img {
  max-width: 100%;
  height: auto;
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.image-col .caption {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 0.5rem;
}

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1rem;
}

.screenshot, .news, .toc {
  max-width: 780px;
  margin: 2rem auto;
}

.dialog {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 2rem 0; /* ← セリフ同士の間を空ける */
}

.dialog {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 2rem 0;
}

.dialog.user {
  flex-direction: row-reverse;
}

.dialog .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.bubble {
  position: relative;
  background: #222;
  color: #ccf;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.6;
  font-size: 0.95rem;
  word-wrap: break-word; 
  word-break: break-word; 
}

.dialog.ai .dialog.other .bubble::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -10px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-right-color: #222;
}

.dialog.user .bubble {
  background: #333;
  color: #fff;
/*  border-top-right-radius: 0; */
}

.dialog.user .bubble::before {
  content: "";
  position: absolute;
  top: 10px;
  right: -10px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-left-color: #333;
}

.image-left,
.image-right,
.image-center {
  text-align: center;
  margin: 2rem 0;
}

.image-left img {
  display: block;
  max-width: 100%;
  margin-left: 0;
  margin-right: auto;
}

.image-right img {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: 0;
}

.image-center img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.image-left img,
.image-right img,
.image-center img {
  max-width: 100%;
  height: auto;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.caption {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 0.3rem;
  text-align: center;
  font-style: italic;
}

.new-mark {
  color: #ff5050;
  font-size: 0.85rem;
  margin-left: 0.5rem;
  font-weight: bold;
}

.upcoming {
  color: #777;
  font-style: italic;
}

.code-block {
  background-color: #040404;
  padding: 1em;
  margin: 1em 0;
  border-left: 4px solid #4ca26c;
  overflow-x: auto;
/*  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.9em;*/
  line-height: 1;
  border-radius: 4px;
}

.image-error-box {
  background-color: #ffeaea;
  color: #d10000;
  border-left: 5px solid #d10000;
  padding: 1em;
  margin: 2em 0;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.1);
}

.video-center {
  text-align: center;
  margin: 2rem 0;
}

.video-center video,
.video-center iframe {
  aspect-ratio: 16 / 9;
  width: 100%; 
  height: auto; 
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.notice-board {
  background: #fff8dc url('images/paper-texture.png') repeat;
  border: 3px dashed #ffcc00;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
  color: #222;
  font-weight: bold;
  font-family: "Yu Gothic", "Helvetica Neue", sans-serif;
}

.notice-board h3 {
  color: #ffcc00;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  text-align: center;
  text-shadow: 1px 1px #000;
  font-weight: bolder;
}

.notice-board ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.notice-board li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .dialog {
    flex-direction: column;
  }
  .dialog.user {
    flex-direction: column;
  }
  .bubble {
    max-width: 100%; 
  }
  .bubble::before {
    display: none;
  }
}


.fold-header {
  color: #ffcc00;
  font-size: 1.2rem;
  cursor: pointer;
  margin: 1.5rem 0 0.5rem;
  transition: color 0.2s;
}

.fold-header:hover {
  color: #fff;
}

.foldable {
  display: none;
}

.foldable.open {
  display: block;
}

.description {
  color: #999;
  margin: -0.5rem 0 1rem 1rem;
}

.toggle-header small {
  font-size: 60%;
  color: #ccc;
}

.toggle-header {
  cursor: pointer;
  transition: color 0.2s ease;
}

h2.toggle-header {
  cursor: pointer;
  transition: color 0.2s ease;
  border-left: none; /* 元のh2のボーダーを消す */
  padding-left: 0; /* ついでに左の余白も調整 */
}

.toggle-header:hover {
  color: #dd9900;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background-color: #181818;
  color: #ddd;
}

th, td {
  border: 1px solid #444;
  padding: 0.6rem 0.8rem;
  text-align: left;
}

th {
  background-color: #222;
  color: #ffcc00;
}
.supplement {
  background-color: #2a2a2a;
  color: #ccc;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  border-left: 4px solid #66ccff;
  margin: 1.5rem 0;
  border-radius: 6px;
}
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
