/* responsive: yes*/ 
@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
:root {
    --color-primary: #FFC107; /* キーカラー: 黄色 */
    --color-primary-dark: #FFA000;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-background: #f9f9f9;
    --color-surface: #ffffff;
    --color-border: #eeeeee;
    --font-family-base: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --border-radius: 12px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.07);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

img, video, svg {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout: Container & Main Structure
   ========================================================================== */
#container {
    background-color: var(--color-surface);
    margin: 2em auto;
    padding: 2em;
    width: 100%;
    max-width: 1280px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

@media (max-width: 768px) {
    #container {
        margin: 1em 0;
        padding: 1.5em 1em;
        border-radius: 0;
    }
}

#content-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
}

#wrapper {
    width: 68%;
    margin-bottom: 40px;
}

#box2 { /* Sidebar */
    width: 28%;
}

#box1 { display: none; }

@media (max-width: 992px) {
    #wrapper, #box2 {
        width: 100%;
    }
    #box2 {
        margin-top: 3em;
    }
}


/* ==========================================================================
   Header: Blog Title
   ========================================================================== */
#blog-title {
    padding: 2em 0 3em;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 3em;
}

#title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -1px;
}

#title a {
    color: var(--color-text);
}
#title a:hover {
    color: var(--color-primary-dark);
}

#blog-description {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0.5em 0 0;
}

/* ==========================================================================
   Main Content: Entries
   ========================================================================== */
.entry {
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 4em;
    padding-bottom: 3em;
}

.entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.entry-header {
    margin-bottom: 2em;
}

.date a {
    background-color: var(--color-primary);
    color: var(--color-text);
    border-radius: 50px;
    padding: 0.4em 1em;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}
.date a:hover {
    background-color: var(--color-primary-dark);
}
.date a::before {
    font-family: "blogicon";
    content: "\f043";
    margin-right: 0.5em;
}

.entry-title {
    font-size: 2rem;
    margin: 0.5em 0;
}

.categories a {
    display: inline-block;
    background-color: #f0f0f0;
    color: var(--color-text-light);
    padding: 0.3em 0.8em;
    margin: 0.2em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.categories a:hover {
    background-color: var(--color-primary);
    color: var(--color-text);
}
.categories a::before {
    font-family: "blogicon";
    content: "\f04a";
    margin-right: 0.4em;
}

/* --- Entry Content Styling --- */
.entry-content {
    line-height: 1.8;
}

.entry-content h3 { /* 大見出し */
    font-size: 1.6rem;
    padding-bottom: 0.5em;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

.entry-content h4 { /* 中見出し */
    font-size: 1.4rem;
    color: var(--color-text);
    border-left: 5px solid var(--color-primary);
    padding-left: 0.8em;
}

.entry-content h5 { /* 小見出し */
    font-size: 1.2rem;
    color: var(--color-text-light);
    font-weight: 600;
}

.entry-content p {
    margin-bottom: 1.2em;
}

.entry-content img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.entry-content blockquote {
    margin: 1.5em 0;
    padding: 1.5em;
    background-color: #fffbeb;
    border-left: 5px solid var(--color-primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: #5c553c;
}

.entry-content ul, .entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}
.entry-content li {
    margin-bottom: 0.5em;
}

/* --- 目次 --- */
.entry-content ul.table-of-contents {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5em 2em;
    margin: 2em 0;
    list-style: none;
}
.entry-content ul.table-of-contents::before {
    content: "目次";
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 1em;
    color: var(--color-text);
}
.entry-content .table-of-contents li a {
    color: var(--color-text-light);
    font-weight: 600;
}
.entry-content .table-of-contents li a:hover {
    color: var(--color-primary-dark);
}

/* ==========================================================================
   Comment Section
   ========================================================================== */
.comment-box {
    margin: 4em auto;
    /* .page-index での display:none を解除 */
    display: block !important;
    max-width: 900px; /* PCでの幅を広げる */
}

@media (max-width: 992px){
    .comment-box {
        max-width: 100%;
    }
}

.comment-box > .leave-comment-title {
    display: inline-block;
    padding: 0.8em 1.5em;
    background-color: var(--color-primary);
    color: var(--color-text);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.comment-box > .leave-comment-title:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.comment-box .comment {
    list-style: none;
    padding: 0;
    margin-top: 2em;
}

.comment-box .entry-comment {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 2em;
}

.comment-box .hatena-id-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content-wrapper {
    background-color: #f7f7f7;
    border-radius: var(--border-radius);
    padding: 1em 1.5em;
    width: 100%;
    position: relative;
}
/* 吹き出しのしっぽ */
.comment-content-wrapper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #f7f7f7 transparent transparent;
}

.comment-user-name {
    font-weight: 700;
    color: var(--color-text);
}
.comment-content {
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.comment-content p {
    margin: 0.5em 0 0;
}
.comment-metadata {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.5em;
}
.comment-metadata a {
    color: #999;
}


/* ==========================================================================
   Sidebar
   ========================================================================== */
.hatena-module {
    margin-bottom: 3em;
}

.hatena-module-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text);
}
.hatena-module-title a {
    color: var(--color-text);
}

.hatena-module-profile .profile-icon {
    border-radius: 50%;
    display: block;
    margin: 0 auto 1em;
    width: 100px;
    height: 100px;
}
.hatena-module-profile .id {
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}
.hatena-module-profile .profile-description {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.hatena-module-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hatena-module-body li {
    margin-bottom: 0.5em;
}
.hatena-module-body li a {
    color: var(--color-text-light);
    font-weight: 600;
    display: block;
    padding: 0.3em 0;
}
.hatena-module-body li a:hover {
    color: var(--color-primary-dark);
}

.hatena-module-search-box .search-form {
    display: flex;
}
.hatena-module-search-box .search-module-input {
    width: 100%;
    border: 1px solid var(--color-border);
    padding: 0.8em;
    border-radius: 50px 0 0 50px;
    outline: none;
}
.hatena-module-search-box .search-module-button {
    border: none;
    background: var(--color-primary);
    color: var(--color-text);
    padding: 0 1.2em;
    cursor: pointer;
    border-radius: 0 50px 50px 0;
    font-weight: 600;
}


/* ==========================================================================
   Archive Page
   ========================================================================== */
.page-archive .archive-entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2em;
}

.page-archive .archive-entry {
    background-color: var(--color-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-archive .archive-entry:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.page-archive .entry-thumb-link {
    display: block;
}

.page-archive .entry-thumb {
    aspect-ratio: 16 / 9;
    width: 100%;
    background-size: cover;
    background-position: center;
}

.page-archive .archive-entry-header,
.page-archive .archive-entry-body {
    padding: 1em 1.2em;
}

.page-archive .archive-entry-header {
    padding-bottom: 0;
}

.page-archive .archive-entry-body {
    flex-grow: 1;
}


.page-archive .entry-title {
    font-size: 1.1rem;
    margin: 0;
}
.page-archive .date {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.5em;
}

.page-archive .entry-description {
    display: none;
}
.page-archive .social-buttons {
    display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#footer {
    text-align: center;
    padding: 2em 0;
    margin-top: 2em;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-light);
}
#footer a {
    color: var(--color-text-light);
    font-weight: 600;
}
#footer a:hover {
    color: var(--color-primary-dark);
}

/* 既存スタイルのうち、不要または上書きするものをリセット */
.entry-header::before, .entry-content h1, .entry-content h2, .entry-content h3::before, .entry-content h3::after, .hatena-module-title::before, .hatena-module-title::after {
    all: unset;
}