/* ========== LW Manual Publisher Styles ========== */

.lwmp-manual {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    line-height: 1.85;
    color: #334155;
}

/* ========== Title & Meta ========== */

.lwmp-title {
    font-size: 2em;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.lwmp-title-archive {
    font-size: 1.4em;
    text-align: center;
    font-weight: 700;
    margin-bottom: 2px;
}
.lwmp-archive-desc-center {
    text-align: center;
}

/* タイトル行（タイトル + 読み上げボタン） */
.lwmp-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
}
.lwmp-title-row .lwmp-title {
    margin: 0;
}
.lwmp-tts-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #64748b;
    font-size: 0.78em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.lwmp-tts-btn:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #6366f1;
}
.lwmp-tts-btn.playing {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.lwmp-tts-btn.playing:hover {
    background: #4f46e5;
}

.lwmp-updated {
    color: #94a3b8;
    font-size: 0.82em;
    margin-bottom: 32px;
}

.lwmp-archive-desc {
    color: #64748b;
    margin-bottom: 36px;
    font-size: 0.95em;
}

/* ========== Breadcrumb ========== */

.lwmp-breadcrumb {
    font-size: 0.82em;
    margin-bottom: 24px;
    color: #94a3b8;
}
.lwmp-breadcrumb a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.15s;
}
.lwmp-breadcrumb a:hover {
    color: #4f46e5;
}
.lwmp-breadcrumb-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

/* ========== TOC ========== */

.lwmp-toc {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 36px;
}
.lwmp-toc-title {
    font-weight: 700;
    font-size: 0.9em;
    margin-bottom: 12px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lwmp-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lwmp-toc li {
    margin: 5px 0;
}
.lwmp-toc li a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.88em;
    transition: color 0.15s;
}
.lwmp-toc li a:hover {
    color: #4f46e5;
    text-decoration: underline;
}
.lwmp-toc li.lwmp-toc-sub {
    padding-left: 20px;
}

/* ========== Content ========== */

.lwmp-content h2 {
    font-size: 1.45em;
    font-weight: 750;
    margin: 64px 0 20px;
    padding: 14px 18px;
    background: #f8fafc;
    border-left: 4px solid #6366f1;
    border-radius: 0 8px 8px 0;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.lwmp-content h2:first-child {
    margin-top: 0;
}
.lwmp-content h3 {
    font-size: 1.15em;
    font-weight: 650;
    margin: 40px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    color: #1e293b;
}
.lwmp-content h4 {
    font-size: 1.02em;
    font-weight: 600;
    margin: 28px 0 8px;
    color: #475569;
    padding-left: 12px;
    border-left: 3px solid #cbd5e1;
}
.lwmp-content p {
    margin: 0 0 16px;
}
/* リセットCSS打ち消し: list-style, padding, margin を復元 */
.lwmp-content ul {
    list-style: disc;
    margin: 0 0 16px;
    padding-left: 24px;
}
.lwmp-content ul ul {
    list-style: circle;
    margin: 4px 0;
}
.lwmp-content ul ul ul {
    list-style: square;
}
.lwmp-content ol {
    list-style: decimal;
    margin: 0 0 16px;
    padding-left: 24px;
}
.lwmp-content ol ol {
    list-style: lower-alpha;
    margin: 4px 0;
}
.lwmp-content li {
    margin: 5px 0;
    line-height: 1.7;
}
.lwmp-content strong {
    color: #1e293b;
    font-weight: 650;
}
.lwmp-content code {
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #6366f1;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}
.lwmp-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 0 0 20px;
    font-size: 0.85em;
    line-height: 1.7;
}
.lwmp-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.lwmp-content blockquote {
    border-left: 3px solid #6366f1;
    padding: 12px 20px;
    margin: 0 0 16px;
    background: #f8fafc;
    color: #475569;
    border-radius: 0 8px 8px 0;
    quotes: none;
}
.lwmp-content blockquote p:last-child {
    margin-bottom: 0;
}
.lwmp-content hr {
    border: none;
    height: 0;
    margin: 0;
}

/* ========== Tables ========== */

.lwmp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    /* リセットCSS打ち消し: スクロールバー表示 */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -ms-overflow-style: auto;
}
.lwmp-table-wrap::-webkit-scrollbar {
    display: block;
    height: 6px;
}
.lwmp-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}
.lwmp-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.lwmp-table-wrap table {
    margin-bottom: 0;
    border: none;
}
.lwmp-content table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    font-size: 0.9em;
}
.lwmp-content th,
.lwmp-content td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
}
.lwmp-content td:last-child,
.lwmp-content th:last-child {
    white-space: normal;
    min-width: 120px;
}
.lwmp-table-wrap th:first-child,
.lwmp-table-wrap td:first-child {
    border-left: none;
}
.lwmp-table-wrap th:last-child,
.lwmp-table-wrap td:last-child {
    border-right: none;
}
.lwmp-table-wrap tr:first-child th {
    border-top: none;
}
.lwmp-table-wrap tr:last-child td {
    border-bottom: none;
}
.lwmp-content th {
    background: #f8fafc;
    font-weight: 650;
    color: #475569;
    font-size: 0.92em;
    position: sticky;
    top: 0;
}
.lwmp-content tr:hover td {
    background: #fafbfd;
}
/* テーブル内の○記号をアクセント色に */
.lwmp-content td {
    color: #475569;
}
.lwmp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ========== Search ========== */

.lwmp-search-wrap {
    margin: 0 0 32px;
}
.lwmp-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95em;
    color: #334155;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.lwmp-search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #fff;
}
.lwmp-search-input::placeholder {
    color: #94a3b8;
}

/* ========== Archive Cards ========== */

.lwmp-highlight-section {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}
.lwmp-highlight-section .lwmp-category-title {
    border-bottom-color: #c7d2fe;
}
.lwmp-card-highlight {
    border-color: #c7d2fe;
    background: #fff;
}
.lwmp-card-highlight:hover {
    border-color: #6366f1;
}
.lwmp-category-section {
    margin-bottom: 40px;
}
.lwmp-category-title {
    font-size: 1.25em;
    font-weight: 750;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    color: #0f172a;
}
.lwmp-cat-count {
    font-size: 0.7em;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 8px;
}
.lwmp-cat-desc {
    font-size: 0.84em;
    color: #94a3b8;
    margin: -8px 0 14px;
    line-height: 1.5;
}
.lwmp-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.lwmp-card {
    display: block;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}
.lwmp-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}
.lwmp-card-title {
    font-weight: 650;
    font-size: 0.95em;
    margin-bottom: 6px;
    color: #1e293b;
}
.lwmp-card-desc {
    font-size: 0.82em;
    color: #94a3b8;
    line-height: 1.5;
}

/* ========== Prev / Next ========== */

.lwmp-prev-next {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}
.lwmp-prev-next a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 500;
    transition: color 0.15s;
}
.lwmp-prev-next a:hover {
    color: #4f46e5;
}
.lwmp-next {
    text-align: right;
}

/* ========== Responsive ========== */

@media (max-width: 600px) {
    .lwmp-manual {
        padding: 24px 16px 48px;
    }
    .lwmp-title {
        font-size: 1.5em;
    }
    .lwmp-content h2 {
        font-size: 1.25em;
        margin-top: 40px;
    }
    .lwmp-content h3 {
        font-size: 1.05em;
    }
    .lwmp-toc {
        padding: 18px 20px;
    }
    .lwmp-card-list {
        grid-template-columns: 1fr;
    }
    .lwmp-prev-next {
        flex-direction: column;
        gap: 10px;
    }
    .lwmp-next {
        text-align: left;
    }

    .lwmp-content th,
    .lwmp-content td {
        padding: 7px 10px;
        font-size: 0.85em;
    }
}
