/* 記事ページ専用スタイル */

/* 記事コンテナ */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
}

.article-main {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
    justify-content: center;
}

/* メイン記事エリア */
.article-main article {
    flex: 1;
    max-width: 900px;
    width: 100%;
}

/* パンくずリスト */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: #6c757d;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* アイキャッチ画像 */
.article-hero-image {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 3 / 2;
    margin: 0 auto 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

/* 記事メタ情報 */
.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.article-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
}

.article-intro .lead {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

/* 目次 */
.article-toc, .toc {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-toc h2, .toc h2, .toc h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.article-toc ol, .toc ol, .toc ul {
    margin: 0;
    padding-left: 1.5rem;
}

.article-toc li, .toc li {
    margin-bottom: 0.5rem;
}

.article-toc a, .toc a {
    color: #667eea;
    text-decoration: none;
}

.article-toc a:hover, .toc a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* セクション */
section {
    margin: 3rem 0;
}

section h2 {
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

section h3 {
    color: #495057;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* コードブロック */
.command-example, .code-example {
    margin: 1.5rem 0;
}

.command-example h4, .code-example h4 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* コードブロック内のコード要素 */
.code-example code {
    display: block;
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #4a5568;
}

/* 実務活用例セクションのスタイル */
.step code, .solution-code code {
    display: block;
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #4a5568;
    margin: 0.5rem 0;
}

.solution-steps {
    margin: 1rem 0;
}

.step {
    margin-bottom: 1.5rem;
}

.step h6 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ASCII アートスタイル */
.code-example pre {
    background: #f8f9fa;
    color: #2d3748;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.3;
    overflow-x: auto;
    margin: 0.5rem 0;
    border: 2px solid #dee2e6;
    white-space: pre;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    unicode-bidi: embed;
    font-feature-settings: "liga" 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* UI説明画像のオーバーレイシステム */
.ui-explanation {
    margin: 2rem 0;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.screenshot-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    display: inline-block;
}

.terminal-screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* オーバーレイラベル共通スタイル */
.ui-label {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #667eea;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4c63d2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    z-index: 10;
    text-align: center;
    transform: translateX(-50%);
}

.label-text {
    white-space: nowrap;
    display: block;
}


/* 画像に対する比例的な位置指定 */
.header-label {
    top: 5%;
    left: 75%;
}

.sidebar-label {
    top: 45%;
    left: 12%;
}

.content-label {
    top: 15%;
    left: 75%;
}

.terminal-label {
    bottom: 15%;
    left: 75%;
}

/* タブレット: 768px以下 */
@media (max-width: 768px) {
    .article-hero-image {
        aspect-ratio: 1 / 1;
        margin-bottom: 1.5rem;
    }

    .screenshot-container {
        padding: 0.75rem;
        max-width: 95%;
    }
    
    .ui-label {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
    }
    
    
    /* 位置は同じ比率を維持 */
    .header-label {
        top: 5%;
        left: 75%;
    }
    
    .sidebar-label {
        top: 45%;
        left: 12%;
    }
    
    .content-label {
        top: 15%;
        left: 75%;
    }
    
    .terminal-label {
        bottom: 15%;
        left: 75%;
    }
}

/* スマートフォン: 480px以下 */
@media (max-width: 480px) {
    .screenshot-container {
        padding: 0.5rem;
        max-width: 100%;
    }
    
    .ui-label {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        border-radius: 12px;
        max-width: 120px;
    }
    
    .label-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    
    /* スマホでも同じ比率を維持（少し調整） */
    .header-label {
        top: 3%;
        left: 75%;
    }
    
    .sidebar-label {
        top: 40%;
        left: 10%;
    }
    
    .content-label {
        top: 12%;
        left: 78%;
    }
    
    .terminal-label {
        bottom: 12%;
        left: 78%;
    }
}

/* インターフェース説明セクション */
.interface-explanation {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.interface-explanation h4 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.explanation-item {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.explanation-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.explanation-content h5 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.explanation-content p {
    margin: 0;
    line-height: 1.6;
    color: #495057;
    font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .interface-explanation {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .explanation-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .explanation-item {
        padding: 1rem;
    }
    
    .explanation-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .explanation-content h5 {
        font-size: 0.9rem;
    }
    
    .explanation-content p {
        font-size: 0.85rem;
    }
}

.command, .code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    border: 1px solid #4a5568;
}

.output {
    background: #1a202c;
    color: #68d391;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    border: 1px solid #2d3748;
}

.explanation {
    color: #6c757d;
    font-style: italic;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* インラインコード */
code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* ボックス要素 */
.info-box, .tip-box, .warning-box, .danger-box {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.info-box {
    background: #e7f3ff;
    border-color: #0066cc;
    color: #003d7a;
}

.tip-box {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
}

.warning-box {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.danger-box {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ハイライトボックス */
.highlight-box {
    background: linear-gradient(135deg, #4c63d2 0%, #5a4fcf 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(76, 99, 210, 0.3);
}

.highlight-box h3 {
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.highlight-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.highlight-box li {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

th:last-child, td:last-child {
    border-right: none;
}

tbody tr:last-child td {
    border-bottom: none;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

tr:hover {
    background: #f8f9fa;
}

/* オプションテーブル */
.option-table, .command-table, .permission-table {
    font-size: 0.9rem;
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.option-table th, .command-table th, .permission-table th {
    background: #f8f9fa;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    border-right: 1px solid #dee2e6;
}

.option-table th:last-child, .command-table th:last-child, .permission-table th:last-child {
    border-right: none;
}

.option-table td, .command-table td, .permission-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    color: #495057;
}

.option-table td:last-child, .command-table td:last-child, .permission-table td:last-child {
    border-right: none;
}

.option-table tr:last-child td, .command-table tr:last-child td, .permission-table tr:last-child td {
    border-bottom: none;
}

.option-table tr:hover, .command-table tr:hover, .permission-table tr:hover {
    background: #f8f9fa;
}

.option-table code, .command-table code, .permission-table code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    color: #d73a49;
    font-weight: 500;
}

/* グリッドレイアウト */
.concept-grid, .features-grid, .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.concept-card, .feature-card, .benefit-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.concept-card h3, .feature-card h3, .benefit-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* サマリーボックス */
.summary-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    border-left: 4px solid #28a745;
}

.summary-box h2 {
    color: #155724;
    margin-bottom: 1rem;
}

/* 次のステップ */
.next-steps {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

/* サイドバー */
.article-sidebar {
    display: none;
}

.sidebar-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-section.sticky {
    position: sticky;
    top: 2rem;
}

.sidebar-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section li {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.sidebar-section a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.sidebar-section a:hover {
    color: #764ba2;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .article-main {
        flex-direction: column;
        padding: 1rem;
    }
    
    .article-sidebar {
        width: 100%;
        order: 1;
    }
    
    .sidebar-section.sticky {
        position: static;
    }
    
    .concept-grid, .features-grid, .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    .command, .code, .output {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

/* ページ固有スタイル */

/* About ページ */
.about-page .mission-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.mission-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.mission-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.story-content {
    line-height: 1.7;
}

.challenge-list {
    margin: 1.5rem 0;
}

.challenge-item {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.challenge-item h4 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.tech-category {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.tech-category h4 {
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.tech-category ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.tech-category li {
    margin-bottom: 0.25rem;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* セキュリティリストとロードマップリストのスタイル */
.security-list, .roadmap-list {
    margin: 1rem 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.security-list li, .roadmap-list li {
    margin-bottom: 0.5rem;
    color: #495057;
    line-height: 1.5;
}

.security-list li {
    font-size: 0.95rem;
}

.roadmap-list li {
    font-size: 0.9rem;
}

/* 一般的なリストスタイルの修正 */
.tech-content ul:not(.security-list):not(.roadmap-list):not(.tech-category ul),
.mission-content ul,
.story-content ul {
    margin: 1rem 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.tech-content ol,
.mission-content ol,
.story-content ol,
.faq-content ol,
.accordion-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

/* 汎用の番号付きリストスタイル（article.css内全般） */
article ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

article ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
    line-height: 1.5;
    color: #495057;
}

.tech-content li:not(.security-list li):not(.roadmap-list li):not(.tech-category li),
.mission-content li,
.story-content li {
    margin-bottom: 0.5rem;
    color: #495057;
    line-height: 1.5;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.value-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* FAQ ページ */
.faq-page .faq-category {
    margin-bottom: 2rem;
}

.faq-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    background: #e9ecef;
    padding: 1rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #dee2e6;
}

.faq-question::after {
    content: '▼';
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.faq-question.active::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1rem;
    display: none;
    border-top: 1px solid #dee2e6;
}

.faq-answer.active {
    display: block;
}

/* 利用規約ページ */
.terms-page .definitions-list {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.definitions-list dt {
    font-weight: bold;
    color: #495057;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.definitions-list dt:first-child {
    margin-top: 0;
}

.definitions-list dd {
    margin-bottom: 0.5rem;
    margin-left: 1rem;
    color: #6c757d;
}

/* プリント用スタイル */
@media print {
    .header, .breadcrumb, .article-sidebar, .site-footer, .action-buttons {
        display: none;
    }
    
    .article-main {
        flex-direction: column;
        max-width: none;
        padding: 0;
    }
    
    .article-main article {
        max-width: none;
    }
    
    .command, .code, .output {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #dee2e6;
    }
    
    a {
        color: #333 !important;
    }
    
    .highlight-box, .btn-primary, .btn-secondary {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #dee2e6;
    }
}

/* ダークモード対応（将来実装用） */
@media (prefers-color-scheme: dark) {
    /* ダークモードの実装はここに追加 */
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* 高コントラスト対応 */
@media (prefers-contrast: high) {
    .btn-primary, .btn-secondary {
        border: 2px solid #333;
    }
    
    .command, .code, .output {
        border: 2px solid #333;
    }
}

/* preタグの横スクロール防止とモバイル最適化 */
pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

/* コマンド・出力用のpreタグは折り返さない */
pre.command, pre.output {
    white-space: pre;
    overflow-x: auto;
}

/* 権限図解用の特別なpreタグ */
.permission-diagram {
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
}

/* モバイルでのpre要素の調整 */
@media (max-width: 768px) {
    pre {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    .permission-diagram {
        font-size: 0.65rem;
        white-space: pre;
        overflow-x: auto;
    }
    
    /* モバイルでは横スクロール可能に */
    .permission-breakdown {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 投資比較テーブル */
.investment-comparison-table {
    width: 100%;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row.header {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.comparison-row.linux {
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
}

.comparison-item {
    padding: 0.75rem;
    text-align: left;
    border-right: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.comparison-item:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-item:last-child {
    border-right: none;
}

.comparison-row.header .comparison-item {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 投資比較テーブルのレスポンシブ対応 */
@media (max-width: 768px) {
    .investment-comparison-table {
        border: none;
        box-shadow: none;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 1rem;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .comparison-row.linux {
        border-left: 4px solid #0066cc;
    }
    
    .comparison-item {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.6rem 1rem;
    }
    
    .comparison-item:last-child {
        border-bottom: none;
    }
    
    .comparison-item::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .comparison-row.header {
        display: none;
    }
}

/* Practice練習ボタンスタイル */
.practice-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.practice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.practice-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* インライン練習ボタン（小） */
.practice-button-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
    vertical-align: middle;
}

.practice-button-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.practice-button-inline:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

.practice-icon {
    font-size: 1rem;
}

.practice-text {
    font-weight: 500;
}

/* .command-box用の練習ボタン調整 */
.command-box .practice-button {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
}

/* .command-list用の練習ボタン調整 */
.command-list li .practice-button-inline {
    margin-left: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .practice-button {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }

    .practice-button-inline {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        margin-left: 0.375rem;
    }

    .practice-icon {
        font-size: 0.9rem;
    }

    .command-box .practice-button {
        width: 100%;
    }
}

/* 記事読了ボタンセクション */
.article-read-button-container {
    margin: 3rem 0 2rem;
    padding: 0;
    max-width: 1000px; /* article-mainと同じ幅 */
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem; /* article-mainと同じpadding */
    padding-right: 2rem;
}

.article-read-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 1px solid #e1e8f7;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.article-read-header h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.article-read-header p {
    color: #5a6c7d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* 読了ボタンスタイル */
.article-read-button-wrapper {
    margin: 1.5rem 0;
}

.article-read-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 200px;
}

.article-read-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.article-read-button:active {
    transform: translateY(0);
}

.article-read-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-icon {
    font-size: 1.2rem;
}

.read-button-hint {
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
}

/* 読了済み表示 */
.article-already-read {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.read-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
}

.status-icon {
    font-size: 1.3rem;
}

.read-time {
    color: #6c757d;
    font-size: 0.9rem;
}

.article-unread-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.article-unread-button:hover {
    background: #5a6268;
}

/* 読書統計 */
.article-read-stats {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e1e8f7;
}

.reading-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #5a6c7d;
}

.stat-icon {
    font-size: 1.1rem;
}

/* 記事ナビゲーションリンク */
.article-read-encouragement {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e8f7;
}

.article-read-encouragement p {
    margin-bottom: 1rem;
    color: #5a6c7d;
    font-size: 0.95rem;
}

.article-navigation-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border: 1px solid #667eea;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.article-nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    text-decoration: none;
}

/* 通知スタイル */
.article-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.article-notification.success {
    border-left: 4px solid #28a745;
}

.article-notification.error {
    border-left: 4px solid #dc3545;
}

.article-notification.info {
    border-left: 4px solid #17a2b8;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-text {
    font-size: 0.9rem;
    color: #2c3e50;
}

/* バッジ獲得通知 */
.badge-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2c3e50;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%) scale(0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 320px;
    border: 2px solid #e6c200;
}

.badge-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge-icon {
    font-size: 2rem;
    animation: badgePulse 2s infinite;
}

.badge-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b6914;
    margin-bottom: 0.25rem;
}

.badge-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.badge-description {
    font-size: 0.85rem;
    color: #5a4a00;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 記事読了ボタン - モバイル対応追加 */
@media (max-width: 768px) {
    .article-read-button-container {
        padding-left: 1rem;
        padding-right: 1rem;
        margin: 2rem 0 1.5rem;
    }

    .article-read-section {
        padding: 1.5rem;
        margin: 0; /* コンテナ側でmarginを管理 */
    }

    .reading-stats {
        gap: 1rem;
        justify-content: space-around;
    }

    .stat-item {
        font-size: 0.8rem;
    }

    .article-navigation-links {
        gap: 0.5rem;
    }

    .article-nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .article-notification,
    .badge-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .badge-content {
        gap: 0.75rem;
    }

    .badge-icon {
        font-size: 1.5rem;
    }
}

/* テーブルスタイル（送付内容用） */
.salary-table,
.learning-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.salary-table th,
.learning-table th,
.salary-table td,
.learning-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e1e8f7;
}

.salary-table th,
.learning-table th {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
}

.salary-table tbody tr:hover,
.learning-table tbody tr:hover {
    background-color: #f8f9ff;
}

.salary-table tbody tr:last-child td,
.learning-table tbody tr:last-child td {
    border-bottom: none;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .salary-table,
    .learning-table {
        font-size: 0.9rem;
    }

    .salary-table th,
    .learning-table th,
    .salary-table td,
    .learning-table td {
        padding: 8px 12px;
    }
}
