@charset utf-8;
/*
Theme Name: hmanga-s
Author: H-Manga.COM
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}
input,
button,
textarea,
select {
    font: inherit;
}
ul,
ol {
    list-style: none;
}
a {
    text-decoration: none;
}

:root {
    --mainColor: #ed6aff;
    --accentColor: #84cc16;
    --baseColor: #fae7ff;
    --subbaseColor: #f1f5f9;
    --basePadding: 16px 16px;
}
@media (min-width: 768px) {
    :root {
        --basePadding: 24px 24px;
    }
}

body {
    font-family: "Roboto", "Hiragino Sans", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
    color: #0e172b;
}
a {
    color: #324158;
}
a:hover {
    color: #61738e;
}

#header {
    background: var(--baseColor);
}
#footer {
    background: var(--subbaseColor);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    display: block;
    color: var(--mainColor);
    font-weight: bold;
    font-size: 20px;
    line-height: 56px;
    padding-left: 16px;
}
.logo img {
    width: 180px;
}
.global-navigation {
    position: relative;
    height: 56px;
    width: 56px;
}
.global-navigation-button {
    position: absolute;
    top: 0;
    right: 0;
    height: 56px;
    width: 56px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11;
}
.global-navigation-button-icon {
    display: inline-block;
    width: 24px;
    height: 2px;
    background-color: var(--mainColor);
    position: relative;
    transition: all 0.3s;
}
.global-navigation-button-icon::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background-color: var(--mainColor);
    position: absolute;
    top: -9px;
    left: 0;
    transition: all 0.3s;
}
.global-navigation-button-icon::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background-color: var(--mainColor);
    position: absolute;
    bottom: -9px;
    left: 0;
    transition: all 0.3s;
}
.active .global-navigation-button-icon {
    background-color: transparent;
}
.active .global-navigation-button-icon::before {
    top: 0;
    transform: rotate(135deg);
}
.active .global-navigation-button-icon::after {
    bottom: 0;
    transform: rotate(-135deg);
}
.global-navigation-content {
    position: absolute;
    top: 0;
    right: 0;
    visibility: hidden;
    background-color: rgba(255, 255, 255, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    width: 100vw;
    height: 100vh;
    transition: all 0.3s;
    z-index: 10;
}
.active .global-navigation-content {
    visibility: visible;
    background-color: rgba(255, 255, 255, 0.9);
}
.global-navigation-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 18px;
    align-items: center;
}

.book {
    background: #353535;
}

/* single: .book とコメント欄の間に少し余白 */
.single .book {
    margin-bottom: 12px;
}
.book-header {
    padding: var(--basePadding);
    background: #fff;
}
.book-header h1 {
    font-size: 20px;
    margin-bottom: 16px;
}
.book-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 12px;
    margin-bottom: 16px;
    color: #8fa1b9;
}
.book-meta span {
    display: block;
    line-height: 20px;
}
.book-meta a {
    display: block;
    line-height: 20px;
    background: var(--subbaseColor);
    padding: 0 4px;
}
.book-artist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.book-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.book-description {
    font-size: 12px;
    margin-bottom: 16px;
}
.book-footer {
    padding: var(--basePadding);
}

.archive {
    padding: var(--basePadding);
    max-width: 1024px;
    margin: 0 auto;
}
.archive-header h1 {
    font-size: 20px;
    margin-bottom: 16px;
}
.archive-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 16px;
    color: #8fa1b9;
}
.archive-sort {
    display: flex;
    gap: 12px;
}
.archive-sort .active {
    border-bottom: solid 3px var(--mainColor);
}
.archive-sort .active a {
    font-weight: bold;
}

.book-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 8px;
    margin-bottom: 24px;
}
.book-list li {
    width: calc((100% - 16px) / 3);
}
@media (min-width: 768px) {
    .book-list {
        gap: 24px 12px;
    }
    .book-list li {
        width: calc((100% - 48px) / 5);
    }
}

.book-list-item-thumbnail {
    margin-bottom: 8px;
    background: var(--subbaseColor);
    overflow: hidden;
}
.book-list-item-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 11/15;
    object-fit: cover;
}
.book-list-item-thumbnail .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    aspect-ratio: 11/15;
    background: var(--subbaseColor);
    color: #fff;
    font-weight: bold;
}
.book-list-item-title {
    display: block;
    display: -webkit-box;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #222;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.3;
    height: 3.8em;
    overflow: hidden;
    margin-bottom: 12px;
}
.book-list-item-meta {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.book-list-item-artist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.book-list-item-artist a,
.book-list-item-artist span {
    display: inline-block;
    line-height: 20px;
    background: var(--subbaseColor);
    padding: 0 6px;
}
.book-list-item-artist span {
    color: #aaa;
}
.book-list-item-date {
    color: #888;
    display: none;
}

.favorites-list li {
    padding: 0;
    border: none;
}

.archive-pagination {
    padding: var(--basePadding);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.archive-pagination a,
.archive-pagination span {
    display: block;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    font-size: 12px;
    background: var(--subbaseColor);
}
.archive-pagination .current {
    background: var(--baseColor);
    font-weight: bold;
    color: var(--mainColor);
}

.recommend {
    padding: var(--basePadding);
    max-width: 1024px;
    margin: 0 auto;
}
.recommend-list-title {
    margin-bottom: 16px;
}
.recommend-list {
    flex-wrap: nowrap;
    overflow-x: scroll;
    padding-bottom: 24px;
    margin-bottom: 8px;
}
.recommend-list li {
    flex-shrink: 0;
    width: calc((100% - 32px) / 3);
}
@media (min-width: 768px) {
    .recommend-list li {
        flex-shrink: 0;
        width: calc((100% - 48px) / 5);
    }
}

.article {
    padding: var(--basePadding);
    max-width: 1024px;
    margin: 0 auto;
}
.article-header h1 {
    font-size: 20px;
    margin-bottom: 16px;
}
.article-body > p {
    margin-bottom: 2em;
}

.term-search-form {
    position: relative;
    margin-bottom: 32px;
}
.term-search-form::before {
    content: "\e8b6";
    font-family: Material Icons;
    position: absolute;
    left: 8px;
    font-size: 24px;
    line-height: 34px;
    color: #aaa;
}
.term-search-form input {
    width: 100%;
    padding-left: 36px;
    border: solid 1px #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    line-height: 32px;
}

.term-search-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.term-search-list li a {
    display: block;
    padding: 0 8px;
    line-height: 30px;
    background: var(--subbaseColor);
    font-size: 14px;
}
.term-search-list li a span {
    display: inline-block;
    font-size: 13px;
    padding-left: 2px;
    color: #aaa;
}

.footer-content {
    padding: var(--basePadding);
}
.footer-navigation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 32px 0 48px;
}
.footer-navigation-list a {
    font-size: 14px;
    color: #888;
}

.copyright {
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

.breadcrumbs {
    padding: var(--basePadding);
    border-top: solid 1px #ddd;
}
.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumbs-list li {
    font-size: 12px;
    color: #aaa;
}
.breadcrumbs-list li a {
    color: #888;
}
.breadcrumbs-list li:has(a)::after {
    content: ">";
    display: inline-block;
    padding-left: 8px;
}

.back-to-top {
    border-bottom: solid 1px #ddd;
}
.back-to-top a {
    display: block;
    padding: var(--basePadding);
    text-align: center;
}

.ranking-select-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}
.ranking-select-tabs .active {
    border-bottom: solid 3px var(--mainColor);
}
.ranking-select-tabs .active a {
    font-weight: bold;
}

.ranking ol {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    counter-reset: item;
}
.ranking ol li {
    width: 100%;
    position: relative;
}
.ranking ol li::before {
    counter-increment: item;
    content: counter(item);
    font-weight: bold;
    color: var(--mainColor);
    font-size: 20px;
    line-height: 123px;
    position: absolute;
    left: 90px;
    display: inline-block;
    width: 48px;
    text-align: center;
}
.ranking ol li a {
    display: flex;
    gap: 16px;
}
.ranking ol li .book-list-item-thumbnail {
    width: 90px;
    margin-bottom: 0;
}
.ranking ol li .book-list-item-title {
    height: auto;
    padding-left: 138px;
    position: absolute;
    bottom: 50%;
    left: 0;
}
.ranking ol li .book-list-item-meta {
    padding-left: 138px;
    position: absolute;
    top: 50%;
    left: 0;
}
@media (min-width: 768px) {
    .ranking ol li {
        width: calc((100% - 16px) / 2);
    }
}

.favorite-button {
    display: flex;
    gap: 4px;
    align-items: center;
}
.favorite-button a {
    cursor: pointer;
    font-size: 18px;
}
.favorite-button .active {
    color: red;
}
.favorite-button .count {
    color: #aaa;
    font-size: 14px;
}

.favorites > p {
    font-size: 13px;
    margin-bottom: 1.5em;
}

.sns-list {
    padding-top: 2em;
}
.sns-list ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.sns-list ul li {
    width: 40px;
}

.rectangle {
    width: 300px;
    height: 250px;
    background: #f9f9f9;
    margin: 16px auto;
}
.mobileonly {
    display: block;
}
@media (min-width: 960px) {
    .mobileonly {
        display: none;
    }
}
.licence {
    color: #999; /* 少し薄いグレー */
    font-size: 11px; /* 1回り小さく */
    line-height: 1.7;
    padding: 12px 10px;
    text-align: center;
}

/* =========================
   Comments / Latest comments
   ========================= */

.book-comments,
.latest-comments {
    padding: var(--basePadding);
    max-width: 1024px;
    margin: 0 auto;
}

.book-comments {
    background: #fff;
    border-radius: 8px;
    margin: 16px auto 24px;
}

.book-comments #reply-title,
.book-comments-title,
.latest-comments-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #0e172b;
}

.book-comments form {
    margin-bottom: 16px;
}
.book-comments .comment-form-author {
    margin-bottom: 10px;
}
.book-comments .comment-form-comment {
    margin-bottom: 10px;
}

.book-comments .comment-form-author input,
.book-comments .comment-form-comment textarea {
    width: 100%;
    border: solid 1px #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
}

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

.book-comments .form-submit {
    margin-top: 10px;
}

.book-comments .comment-submit {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--mainColor);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}
.book-comments .comment-submit:hover {
    filter: brightness(0.95);
}

.book-comments .comment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-comments .comment-list > li {
    background: var(--subbaseColor);
    border-radius: 8px;
    padding: 10px 12px;
}

.book-comments .comment-author {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
}
.book-comments .comment-metadata,
.book-comments .comment-metadata a {
    font-size: 11px;
    color: #8fa1b9;
}
.book-comments .comment-content {
    font-size: 13px;
    color: #0e172b;
    word-break: break-word;
}

.book-comments .navigation.comment-navigation {
    margin-top: 12px;
}
.book-comments .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.book-comments .nav-links a {
    display: inline-block;
    padding: 8px 10px;
    background: var(--subbaseColor);
    border-radius: 999px;
    font-size: 12px;
}

.latest-comments {
    margin: 16px auto 0;
}
.latest-comments--top {
    padding-top: 0;
    padding-bottom: 24px;
}
.latest-comments-header {
    margin-bottom: 12px;
}
.latest-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.latest-comments-item a {
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    border: solid 1px #eee;
}
.latest-comments-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #8fa1b9;
    margin-bottom: 6px;
}
.latest-comments-author {
    color: #324158;
    font-weight: bold;
}
.latest-comments-excerpt {
    font-size: 13px;
    color: #0e172b;
    margin-bottom: 6px;
}
.latest-comments-post {
    font-size: 12px;
    color: #61738e;
}
.latest-comments-empty {
    font-size: 13px;
    color: #8fa1b9;
    background: var(--subbaseColor);
    border-radius: 8px;
    padding: 12px;
}
