﻿body {
    font-family: Arial, sans-serif;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    line-height: 1.6;
    color: #111827;
}

h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

h2 {
    margin-top: 0;
}

.box {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    background: #fff;
}

.toc {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.toc-card {
    display: block;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: #111827;
    background: #f9fafb;
    overflow: hidden;
}

.toc-card:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.toc-thumb {
    width: 100%;
    height: 135px;
    object-fit: contain;
    object-position: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: block;
    margin-bottom: 12px;
}

.toc-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

video,
img.preview {
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    border: 1px solid #ccc;
    display: block;
}

a.button,
button.button {
    display: inline-block;
    margin: 8px 8px 8px 0;
    padding: 12px 18px;
    background: #1f2937;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    font: inherit;
}

a.button:hover,
button.button:hover {
    background: #374151;
}

button.button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.counter {
    margin-top: 8px;
    color: #374151;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 20px 0;
}

.nav-buttons a {
    display: inline-block;
    padding: 10px 14px;
    background: #e5e7eb;
    color: #111827;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.nav-buttons a:hover {
    background: #d1d5db;
}

.comment-box {
    border-color: #9ca3af;
    background: #f9fafb;
}

.comment-form label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
}

.comment-form textarea {
    min-height: 110px;
    resize: vertical;
}

.comment-status {
    margin-top: 10px;
    color: #374151;
}

.page {
    display: none;
}

.page.active {
    display: block;
}
