@import 'tailwindcss';
@plugin "@tailwindcss/typography";
@font-face {
  font-family: 'Noto Sans JP';
  font-weight: 400;
  src: url(./NotoSansJP-Regular.otf);
}

@font-face {
  font-family: 'Noto Sans JP';
  font-weight: 500;
  src: url(./NotoSansJP-Medium.otf);
}

@font-face {
  font-family: 'Noto Sans JP';
  font-weight: 700;
  src: url(./NotoSansJP-Bold.otf);
}
:root {
  --text-error: #e57373;
  --text-muted: #aaa;
  --link-hover: #66ccff;
  --input-bg: #f5f5f5;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --accent-color: #3b82f6;
  --card-bg: #ffffff;
  --hover-bg: #f3f4f6;
  --contact-bg: #969605;
  --text-contact: #fff;
  --h-text: ##2a9837;
  --bg-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='803' height='803' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23D2D2D2' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%23D6D6D6'%3E%3Ccircle cx='769' cy='229' r='8'/%3E%3Ccircle cx='539' cy='269' r='8'/%3E%3Ccircle cx='603' cy='493' r='8'/%3E%3Ccircle cx='731' cy='737' r='8'/%3E%3Ccircle cx='520' cy='660' r='8'/%3E%3Ccircle cx='309' cy='538' r='8'/%3E%3Ccircle cx='295' cy='764' r='8'/%3E%3Ccircle cx='40' cy='599' r='8'/%3E%3Ccircle cx='102' cy='382' r='8'/%3E%3Ccircle cx='127' cy='80' r='8'/%3E%3Ccircle cx='370' cy='105' r='8'/%3E%3Ccircle cx='578' cy='42' r='8'/%3E%3Ccircle cx='237' cy='261' r='8'/%3E%3Ccircle cx='390' cy='382' r='8'/%3E%3C/g%3E%3C/svg%3E");

  [data-theme='dark'] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --accent-color: #f5f56e;
    --card-bg: #1f2937;
    --hover-bg: #374151;
    --contact-bg: #d2ff38;
    --text-contact: #374151;
    --h-text: #cc70d3;
    --bg-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='803' height='803' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23252525' stroke-width='1.2'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%23404040'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%3E%3C/g%3E%3C/svg%3E");
  }
}
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.transcript-accordion {
  margin-top: 30px;
}

.transcript-accordion summary {
  cursor: pointer;
  padding: 15px 20px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
  font-weight: bold;
  font-size: 1.1em;
  user-select: none;
  transition: background-color 0.2s ease;
  border: 1px solid var(--border-color);
}

.transcript-accordion summary:hover {
  opacity: 0.8;
}

.transcript-accordion[open] summary {
  background-color: var(--bg-secondary);
  border-radius: 4px 4px 0 0;
}

.code-example {
  background-color: var(--bg-secondary);
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 10px 0;
}

code {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--bg-secondary);
  padding: 2px 5px;
  border-radius: 3px;
}

pre code {
  display: block;
  padding: 15px;
  background-color: transparent;
}

#chapter-list ul {
  list-style: none;
  padding: 0;
}
#chapter-list li {
  cursor: pointer;
  color: var(--text-secondary);
  margin-bottom: 5px;
  line-height: 1.5;
}
#chapter-list li:hover {
  color: var(--accent-color);
}

details[open] summary::after {
  content: '◀';
  float: right;
  color: var(--text-secondary);
}
summary::after {
  content: '▼';
  float: right;
  color: var(--text-secondary);
}

.post-content pre {
  margin: 1.5rem 0;
  line-height: 1.6;
  border: 1px solid var(--accent-color);
  padding: 1rem;
  border-radius: 0.5rem;
}

body {
  margin-top: 80px;
  font-family: 'Noto Sans JP';
  overflow-wrap: anywhere; /* 収まらない場合に折り返す */
  word-break: normal; /* 単語の分割はデフォルトに依存 */
  line-break: strict; /* 禁則処理を厳格に適用 */
}

.post-content th {
  color: var(--text-primary);
  font-weight: 600;
}

/* 見出し */
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-weight: 600;
}

.post-content p {
  line-height: 2.5;
  margin: 20px 0;
}

.post-content h2 {
  font-size: 1.75rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--contact-bg);
  padding: 6px 0;
  color: var(--h-text);
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  border-left: 6px solid var(--contact-bg);
  padding-left: 6px;
}

.post-content h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}

.post-content .green {
  color: #79d779;
  font-weight: 600;
}

.post-content .pink {
  color: palevioletred;
}

.post-content .teisei {
  text-decoration: line-through;
}

.post-content .red {
  color: #e79696;
}

.post-content .big {
  font-size: 1.5em;
}

.post-content .orange {
  color: #f19853;
}

.post-content .tyuui {
  text-decoration: underline;
  font-weight: 600;
}

.post-content .green2 {
  font-weight: 600;
  color: #28968a;
}

.post-content strong {
  color: var(--text-primary);
}

.post-content a:not(.share-button) {
  color: var(--accent-color);
  text-decoration: underline;
}

.post-content a:hover {
  opacity: 0.8;
  text-decoration: none;
}

.post-content blockquote {
  border-left: 4px solid var(--contact-bg);
  padding-left: 1rem;
  color: var(--contact-bg);
  margin: 1.5rem 0;
}

.post-content .kg-bookmark-thumbnail img {
  margin: 0;
  display: block;
}

.story li a {
  display: block;
  padding: 10px;
  margin: 10px;
  border-bottom: 1px solid var(--border-color);
}

.toc-list ol a {
  font-size: 16px;
}

/* 目次（TOCスクリプト）の開閉 */
/* 目次の開閉の初期表示 */
details {
  border: 1px solid rgb(200, 200, 200);
  border-radius: 3px;
  padding: 0.7em 0.7em 0.7em;
}
/* 目次の開閉のテキスト表示 */
summary {
  padding: 0.7em 0.7em 0.7em;
  font-weight: bold;
  margin: -0.7em;
  text-align: center;
  cursor: pointer;
}
/* 目次を開いた表示 */
details[open] {
  padding: 0.7em;
  border: none;
  box-shadow: none;
  border-top: 1px solid rgb(200, 200, 200);
  padding-bottom: 0;
}
/* 目次を閉じた表示 */
details[open] summary {
  border: 1px solid rgb(200, 200, 200);
  padding: 0.7em;
}

.sm-current {
  background-color: #3b82f6;
  color: #fff;
  pointer-events: none;
  font-weight: 600;
}

.story li a:hover {
  color: var(--bg-primary);
  opacity: 0.8;
  background-color: var(--text-primary);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  background-image: var(--bg-img);
}

.card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.card:hover {
  background-color: var(--hover-bg);
}

.sidebar-bg {
  background-color: var(--bg-secondary);
}

.text-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ハンバーガーメニューのスタイル */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #1f2937;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 50;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu ul {
  padding: 1rem 0;
}

.mobile-menu li {
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu li:last-child {
  border-bottom: none;
}

.mobile-menu a {
  display: block;
  padding: 1rem 1.5rem;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
  background-color: var(--hover-bg);
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}

/* デスクトップでは通常のメニューを表示 */
@media (min-width: 1280px) {
  .hamburger {
    display: none;
  }

  .desktop-menu {
    display: flex !important;
  }

  .mobile-menu {
    display: none;
  }
  .right-hamburger {
    display: none;
  }
}

/* モバイルでは通常のメニューを非表示 */
@media (max-width: 1279px) {
  .desktop-menu {
    display: none;
  }
}

.contact-button {
  color: var(--text-primary);
  background-color: var(--contact-bg);
}
