/* ================================
   Reset & Base
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans JP", sans-serif;
}

body {
    background-color: #fff8e7;
    color: #222;
    line-height: 1.7;
    padding-bottom: 4rem;
}

main,
article.post {
    margin-left: 3%;
    margin-right: 3%;
    max-width: 900px;
}

/* ================================
   Links
================================ */
a {
    text-decoration: underline;
    color: blueviolet;
}

a:hover {
    color: violet;
}

/* ================================
   Top Title (your custom header)
================================ */
div.top_title {
    background-color: #fff8e7;
}

span.top_title_main {
    font-family: "DotGothic16", sans-serif;
    color: blueviolet;
    font-size: min(3rem, 10vw);
    -webkit-text-stroke: 3px violet;
    position: relative;
}

span.top_title_sub {
    font-family: "DotGothic16", sans-serif;
    color: blueviolet;
    font-size: min(1.8rem, 18vw);
}

span.top_title {
    font-family: "DotGothic16", sans-serif;
    -webkit-text-stroke: 0;
    position: absolute;
}

span.top_title_sub_big {
    font-size: min(2.25rem, 15vw);
}

/* ================================
   Menu Table
================================ */
table.menu {
    width: 100%;
    background-color: #fff8e7;
}

td.menu {
    text-align: center;
    border: 0.2rem solid midnightblue;
}

/* ================================
   Images
================================ */
img {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin: 1.2rem auto;
}

/* ================================
   TOC (page.toc)
================================ */
.toc {
    background-color: #f8f4ff;
    padding: 1rem;
    margin: 2rem 0;
    border-left: 4px solid blueviolet;
    border-radius: 4px;
}

.toc h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

/* ## (h2) */
.toc>ul>li {
    margin: 0.4em 0;
    padding-bottom: 0.4em;
    border-bottom: 1px solid #ccc;
    font-weight: 600;
}

/* ### (h3) */
.toc>ul>li>ul {
    padding-left: 1rem;
    margin-top: 0.3rem;
}

.toc>ul>li>ul>li {
    font-weight: 400;
    font-size: 0.9rem;
    border-bottom: none;
    color: #555;
    padding-bottom: 0.2em;
}

/* ================================
   Headings
================================ */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    color: #222;
    line-height: 1.3;
    letter-spacing: 0.02em;
    border-bottom: 2px solid blueviolet;
    padding-bottom: 0.3rem;
}

h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #333;
    border-left: 4px solid blueviolet;
    padding-left: 0.5rem;
}

h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem 0;
    color: #444;
    border-bottom: 1px dashed blueviolet;
    padding-bottom: 0.2rem;
    padding-left: 0.5rem;
    border-left: 3px solid violet;
}

/* ================================
   Code Blocks
================================ */
pre code {
    background-color: #000;
    color: #fff;
    display: block;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    overflow-x: auto;
}

/* ================================
   Paragraphs
================================ */
p {
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

/*
    ヘッダー画像
*/

.site-header {
    width: 100%;
    background-color: #fff8e7;
    padding: 0;
    /* 余白を消す */
}

.site-logo {
    width: 100%;
    /* 横幅いっぱい */
    height: auto;
    /* 縦は自動調整 */
    display: block;
}

.home-title,
.section-title {
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
    color: blueviolet;
}

.category-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0 2rem 0;
}

.category-item {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.category-item a {
    color: blueviolet;
    text-decoration: underline;
}

.category-count {
    color: #555;
    margin-left: 0.3rem;
}

.post-list {
    margin-top: 1rem;
}

.post-card {
    padding: 1rem 0;
    border-bottom: 2px solid #ddd;
}

.post-card h2 {
    margin: 0.2rem 0;
}

.post-desc {
    color: #555;
    margin-top: 0.3rem;
}

/* ================================
   Footer
================================ */
.site-footer {
    text-align: center;
    padding: 2rem 3%;
    margin-top: 4rem;
    border-top: 2px solid blueviolet;
    font-size: 0.85rem;
    color: #555;
}

.site-footer a {
    color: blueviolet;
    text-decoration: underline;
}

.site-footer a:hover {
    color: violet;
}

/* ================================
   Table
================================ */
table:not(.menu) {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 2px blueviolet;
}

table:not(.menu) thead {
    background-color: blueviolet;
    color: #fff;
}

table:not(.menu) th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.03em;
}

table:not(.menu) td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e0d6f5;
    color: #333;
}

table:not(.menu) tbody tr:last-child td {
    border-bottom: none;
}

table:not(.menu) tbody tr:nth-child(even) {
    background-color: #f5f0ff;
}

table:not(.menu) tbody tr:hover {
    background-color: #ede6ff;
    transition: background-color 0.15s ease;
}

/* ================================
   Inline styles
================================ */
strong {
    font-weight: 700;
    color: #222;
}

del {
    color: #888;
    text-decoration: line-through double;
}

/* ================================
   Lists
================================ */

/* 箇条書き */
article.post ul:not(.toc ul) {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}

article.post ul:not(.toc ul) li {
    margin: 0.4em 0;
    padding-left: 0.3rem;
}

/* 番号付きリスト */
article.post ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}

article.post ol li {
    margin: 0.4em 0;
    padding-left: 0.3rem;
}

/* ネストされたリスト */
article.post ul ul,
article.post ol ol,
article.post ul ol,
article.post ol ul {
    margin: 0.2rem 0;
    padding-left: 1.2rem;
}