/*
Theme Name: Rule34JP Masonry
Theme URI: https://example.com/
Author: Custom Theme
Author URI: https://example.com/
Description: Rule34JP frontend adaptation with Japanese visitor text, clean dark header, Japan red accent and masonry post cards.
Version: 1.29.0-rule34jp
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hp-masonry
*/

:root {
    --hp-dark: #363636;
    --hp-dark-2: #2f2f2f;
    --hp-text: #606060;
    --hp-muted: #9b9b9b;
    --hp-soft: #f1f1f1;
    --hp-border: #eeeeee;
    --hp-pink: #bc002d;
    --hp-pink-2: #7a001d;
    --hp-gold: #ffffff;
    --hp-white: #ffffff;
    --hp-font: "Noto Sans JP", "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
    --hp-topbar-height: 72px;
    --hp-topbar-height-mobile: 56px;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--hp-white);
    color: var(--hp-text);
    font-family: var(--hp-font);
    font-size: 15px;
    line-height: 1.55;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.hp-menu-open,
body.hp-search-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

/* Header */
.hp-site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--hp-white);
}

.hp-topbar {
    position: relative;
    height: var(--hp-topbar-height);
    width: 100vw;
    max-width: 100vw;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    transition: background .22s ease, box-shadow .22s ease;
}

.hp-site-header.hp-is-scrolled .hp-topbar {
    background: rgba(247,247,247,.96);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .hp-topbar {
        padding: 0 9px;
    }
}


.hp-icon-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #474747;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

.hp-icon-btn:hover,
.hp-icon-btn:focus-visible {
    background: rgba(0,0,0,.05);
    outline: none;
}

.hp-icon-btn:active {
    transform: scale(.96);
}

.hp-burger-lines {
    position: relative;
    width: 20px;
    height: 14px;
    display: block;
}

.hp-burger-lines span {
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #474747;
    transition: transform .2s ease, top .2s ease, opacity .2s ease;
}

.hp-burger-lines span:nth-child(1) { top: 0; }
.hp-burger-lines span:nth-child(2) { top: 6px; }
.hp-burger-lines span:nth-child(3) { top: 12px; }

.hp-menu-toggle.is-open .hp-burger-lines span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.hp-menu-toggle.is-open .hp-burger-lines span:nth-child(2) {
    opacity: 0;
}

.hp-menu-toggle.is-open .hp-burger-lines span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

.hp-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #474747;
    font-size: 21px;
    line-height: 1;
    letter-spacing: -0.045em;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.hp-logo span {
    background: var(--hp-pink);
    color: #fff;
    border-radius: 4px;
    padding: 4px 5px 5px;
    line-height: .9;
    border: 0;
    box-shadow: none;
}

.hp-search-svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Terms scroller */
.hp-termbar {
    width: 100vw;
    max-width: 100vw;
    height: 47px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.04);
    overflow: hidden;
}

.hp-term-scroll {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
}

.hp-termbar:hover .hp-term-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.16) transparent;
}

.hp-term-scroll::-webkit-scrollbar {
    height: 2px;
}

.hp-term-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.hp-term-scroll::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.hp-termbar:hover .hp-term-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.18);
}

.hp-term-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 16px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #666666;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.hp-term-pill:first-child {
    margin-left: 0;
}

.hp-term-pill:hover {
    background: #e8e8e8;
    color: #4a4a4a;
}

.hp-term-pill:active {
    transform: scale(.98);
}

/* Burger dropdown */
.hp-menu-backdrop,
.hp-search-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9996;
    background: rgba(0,0,0,.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.hp-menu-backdrop.is-open,
.hp-search-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.hp-drawer {
    position: fixed;
    top: var(--hp-topbar-height);
    left: 12px;
    z-index: 10020;
    width: min(460px, calc(100vw - 24px));
    max-height: calc(100vh - var(--hp-topbar-height) - 16px);
    overflow: auto;
    background: #ffffff;
    color: #4a4a4a;
    border-radius: 0 0 20px 20px;
    border: 1px solid rgba(0,0,0,.06);
    border-top: 0;
    box-shadow: 0 26px 70px rgba(0,0,0,.20);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.hp-drawer.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hp-drawer-inner {
    padding: 18px;
}

.hp-drawer::-webkit-scrollbar {
    width: 4px;
}

.hp-drawer::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.16);
    border-radius: 999px;
}


.hp-drawer-title {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.hp-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-drawer li + li {
    margin-top: 2px;
}

.hp-drawer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #626262;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.hp-drawer a:hover {
    background: #f5f5f5;
    color: #4d4d4d;
}

.hp-drawer a:active {
    transform: scale(.99);
}


.hp-drawer .sub-menu {
    padding: 4px 0 6px 13px;
}

.hp-drawer .sub-menu a {
    min-height: 34px;
    font-size: 13px;
    color: #767676;
}

.hp-drawer-section + .hp-drawer-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eeeeee;
}

.hp-drawer-menu,
.hp-fallback-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-drawer-menu li + li,
.hp-fallback-menu li + li {
    margin-top: 7px;
}

.hp-drawer-section-top .hp-drawer-menu a,
.hp-drawer-section-top .hp-fallback-menu a {
    min-height: 44px;
    background: #f7f7f7;
    color: #555555;
    font-weight: 700;
}

.hp-drawer-section-top .hp-drawer-menu li:first-child a,
.hp-drawer-section-top .hp-fallback-menu li:first-child a {
    background: linear-gradient(135deg, var(--hp-pink), var(--hp-pink-2));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(217,79,131,.18);
}

.hp-drawer-category-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.hp-drawer-category-list a {
    background: #f7f7f7;
    color: #5f5f5f;
    min-height: 40px;
    font-size: 14px;
    font-weight: 650;
}

.hp-drawer-category-list a:hover,
.hp-drawer-menu a:hover,
.hp-fallback-menu a:hover {
    background: #f1f1f1;
}

.hp-drawer-category-list a em {
    min-width: 28px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ffffff;
    color: #9a9a9a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
}

.hp-drawer-friends-menu a,
.hp-drawer-useful-menu a {
    min-height: 38px;
    font-size: 14px;
    font-weight: 600;
    color: #676767;
}

.hp-drawer-useful-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.hp-drawer-useful-menu li + li {
    margin-top: 0;
}

.hp-drawer-useful-menu a {
    justify-content: center;
    text-align: center;
    background: #f8f8f8;
}

.hp-drawer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.hp-drawer-grid a {
    background: #f7f7f7;
    min-height: 36px;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

/* Search dropdown */
.hp-search-panel {
    position: fixed;
    top: var(--hp-topbar-height);
    right: 12px;
    z-index: 10020;
    width: min(580px, calc(100vw - 24px));
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    border: 1px solid rgba(0,0,0,.06);
    border-top: 0;
    box-shadow: 0 26px 70px rgba(0,0,0,.20);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.hp-search-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hp-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
}

.hp-search-field {
    width: 100%;
    height: 45px;
    border: 1px solid #e7e7e7;
    border-radius: 999px;
    background: #f7f7f7;
    color: #4a4a4a;
    padding: 0 16px;
    outline: none;
    font-size: 15px;
    font-weight: 500;
}

.hp-search-field:focus {
    border-color: #cfcfcf;
    background: #fff;
}

.hp-search-submit {
    flex: 0 0 auto;
    height: 45px;
    border: 0;
    border-radius: 999px;
    background: var(--hp-dark);
    color: #fff;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Main masonry */
.hp-main {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0;
}

.hp-archive-title {
    width: 100%;
    padding: 22px 16px 0;
    margin: 0;
    color: #4a4a4a;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.hp-archive-desc {
    width: 100%;
    max-width: 760px;
    padding: 6px 16px 0;
    color: #777777;
    font-size: 15px;
}

.hp-masonry {
    --hp-masonry-gap: 22px;
    width: 100%;
    columns: 260px auto;
    column-gap: var(--hp-masonry-gap);
    padding: 18px 18px 60px;
}

.hp-masonry.hp-js-masonry {
    position: relative;
    columns: auto !important;
    column-gap: 0 !important;
}

.hp-masonry.hp-js-masonry .hp-card {
    position: absolute;
    margin: 0 !important;
    transform: translateZ(0);
}

.hp-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 28px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    background: transparent;
}

.hp-card-thumb {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: #e9e9e9;
}

.hp-card-thumb img {
    width: 100%;
    height: auto;
    transform: translateZ(0) scale(1.001);
    transition: opacity .2s ease, transform .22s ease;
}

.hp-card:hover .hp-card-thumb img {
    opacity: .965;
    transform: translateZ(0) scale(1.012);
}

.hp-card-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(0,0,0,.08), rgba(0,0,0,.02)),
        #e7e7e7;
    color: #999;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hp-card-body {
    padding-top: 11px;
}

.hp-card-term {
    display: block;
    margin-bottom: 7px;
    color: #a8a8a8;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.hp-card-title {
    margin: 0;
    color: #5e5e5e;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.012em;
    text-rendering: geometricPrecision;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-card-title a:hover {
    color: #3f3f3f;
    text-decoration: none;
}

.hp-card-sep {
    width: 100%;
    height: 1px;
    margin: 9px 0 10px;
    background: #e9e9e9;
}

.hp-card-meta {
    color: #9c9c9c;
    font-size: 11px;
    line-height: 1.25;
}

.hp-card-meta a {
    color: #696969;
    font-weight: 500;
}

.hp-card-meta a:hover {
    color: #4a4a4a;
}


.hp-masonry-ad-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 28px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    background: transparent;
}

.hp-masonry-ad-slot {
    width: 300px;
    min-height: 250px;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 6px;
    background: transparent;
}

.hp-masonry-ad-slot iframe,
.hp-masonry-ad-slot img,
.hp-masonry-ad-slot ins {
    max-width: 100%;
}

/* Load more */
.hp-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 0 16px 62px;
}

.hp-load-more {
    min-width: 170px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--hp-pink), var(--hp-pink-2));
    color: #fff;
    box-shadow: 0 12px 28px rgba(217,79,131,.24);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
}

.hp-load-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(217,79,131,.3);
}

.hp-load-more:disabled {
    cursor: default;
    opacity: .55;
    transform: none;
}

.hp-load-more.is-loading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hp-load-more.is-loading span::after {
    content: '';
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 999px;
    animation: hpSpin .7s linear infinite;
}

@keyframes hpSpin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.hp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px 60px;
}

.hp-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f1f1;
    color: #5b5b5b;
    font-size: 13px;
    font-weight: 600;
    padding: 0 12px;
}

.hp-pagination .current,
.hp-pagination .page-numbers:hover {
    background: var(--hp-dark);
    color: #fff;
}

/* Single and pages */
.hp-single-wrap {
    width: 100%;
    max-width: 100%;
    margin: 30px auto 70px;
}

.hp-single {
    width: min(820px, calc(100% - 32px));
    margin: 0 auto;
    text-align: left;
}

.hp-single-title {
    margin: 0 0 8px;
    color: #545454;
    font-size: clamp(17px, 1.25vw, 21px);
    line-height: 1.18;
    letter-spacing: -.012em;
    font-weight: 500;
    text-rendering: geometricPrecision;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-single-meta {
    margin-bottom: 18px;
    color: #9a9a9a;
    font-size: 12px;
    font-weight: 500;
}

.hp-single-thumb {
    max-width: 820px;
    margin: 0 auto 26px;
    overflow: hidden;
    border-radius: 6px;
    background: #efefef;
}

.hp-single-content {
    max-width: 760px;
    margin: 0 auto;
    color: #5d5d5d;
    font-size: 16px;
    line-height: 1.75;
}

.hp-single-content p {
    margin-left: auto;
    margin-right: auto;
}

.hp-single-content > .alignwide {
    max-width: 920px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.hp-single-content > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.hp-single-content > *:first-child {
    margin-top: 0;
}

.hp-single-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hp-single-content img {
    border-radius: 6px;
}

.hp-single-content figure {
    max-width: 100%;
}

.hp-single-content h2,
.hp-single-content h3,
.hp-single-content h4 {
    letter-spacing: -.035em;
    line-height: 1.15;
}

.hp-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.hp-entry-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #5b5b5b;
    font-size: 13px;
    font-weight: 700;
}

.hp-empty {
    padding: 56px 16px 80px;
    text-align: center;
}

.hp-empty h1 {
    margin: 0 0 10px;
    font-size: 28px;
    letter-spacing: -.04em;
}

.hp-empty p {
    margin: 0 auto;
    max-width: 520px;
    color: #777777;
}


/* Single navigation and related */
.hp-post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: min(820px, calc(100% - 32px));
    margin: 28px auto 44px;
}

.hp-post-nav-item:empty {
    display: none;
}

.hp-nav-card {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--hp-pink), var(--hp-pink-2));
    color: #fff;
    box-shadow: 0 12px 28px rgba(217,79,131,.18);
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.hp-nav-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(217,79,131,.24);
}

.hp-nav-card-kicker {
    display: block;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
}

.hp-related {
    width: 100vw;
    max-width: 100vw;
    margin-top: 12px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-top: 1px solid #eeeeee;
    padding: 26px 18px 52px;
}

.hp-related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 4px;
}

.hp-related-head h2 {
    margin: 0;
    color: #5b5b5b;
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: -.03em;
    font-weight: 700;
}

.hp-related-masonry {
    --hp-masonry-gap: 18px;
    columns: 220px auto;
    column-gap: var(--hp-masonry-gap);
    padding: 16px 0 20px;
}

.hp-related-masonry .hp-card {
    margin-bottom: 22px;
}


/* Theme ad zones */
.hp-ad-zone {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hp-ad-zone iframe,
.hp-ad-zone img,
.hp-ad-zone ins {
    max-width: 100%;
}

.hp-footer-ad-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 28px 16px 34px;
    border-top: 1px solid #eeeeee;
    background: #fff;
}

.hp-footer-ad-grid {
    display: grid;
    grid-template-columns: repeat(3, 300px);
    justify-content: center;
    gap: 18px;
    max-width: 100%;
}

.hp-footer-ad-slot,
.hp-single-ad-slot {
    width: 300px;
    min-height: 250px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: transparent;
}

.hp-single-ad-wrap {
    display: grid;
    grid-template-columns: repeat(2, 300px);
    justify-content: center;
    gap: 18px;
    width: min(820px, calc(100% - 32px));
    margin: -22px auto 42px;
}

/* Footer */
.hp-footer {
    padding: 34px 16px;
    border-top: 1px solid #eeeeee;
    color: #9a9a9a;
    text-align: center;
    font-size: 12px;
}

/* Responsive masonry */
@media (min-width: 1900px) {
    .hp-masonry {
        --hp-masonry-gap: 22px;
        columns: 245px auto;
    }
}

@media (max-width: 1080px) {
    .hp-masonry {
        --hp-masonry-gap: 18px;
        columns: 220px auto;
    }
}

@media (max-width: 760px) {
    .hp-topbar {
        height: var(--hp-topbar-height-mobile);
        padding: 0 9px;
    }

    .hp-icon-btn {
        width: 38px;
        height: 38px;
    }

    .hp-logo {
        font-size: 16px;
    }

    .hp-termbar {
        height: 44px;
    }

    .hp-term-scroll {
        gap: 7px;
        padding: 7px 0;
    }

    .hp-term-pill {
        min-height: 30px;
        padding: 0 13px;
        font-size: 13px;
    }

    .hp-drawer,
    .hp-search-panel {
        top: var(--hp-topbar-height-mobile);
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - var(--hp-topbar-height-mobile));
        border-radius: 0 0 18px 18px;
    }

    .hp-search-panel {
        left: 0;
    }

    .hp-masonry {
        --hp-masonry-gap: 14px;
        columns: 170px auto;
        padding: 14px 10px 44px;
    }

    .hp-card {
        margin-bottom: 22px;
    }

    .hp-card-body {
        padding-top: 9px;
    }

    .hp-card-title {
        font-size: 14px;
        line-height: 1.35;
    }

    .hp-card-term {
        font-size: 9px;
    }

    .hp-single-wrap {
        width: 100%;
        margin-top: 22px;
    }

    .hp-single {
        width: calc(100% - 24px);
    }

    .hp-single-title {
        font-size: 18px;
    }

    .hp-single-content {
        font-size: 16px;
    }

    .hp-post-nav {
        grid-template-columns: 1fr;
    }

    .hp-nav-card {
        min-height: 50px;
    }

    .hp-footer-ad-grid,
    .hp-single-ad-wrap {
        grid-template-columns: 1fr;
    }

    .hp-single-ad-wrap {
        width: calc(100% - 24px);
        margin-top: -18px;
    }

    .hp-footer-ad-slot,
    .hp-single-ad-slot {
        margin: 0 auto;
    }
}


@media (max-width: 430px) {
    .hp-masonry {
        columns: 1;
        padding-left: 12px;
        padding-right: 12px;
    }
}



/* Integrated YellowPencil customizations from style-may-16.css */
body .hp-topbar .hp-logo span{
    border-style:none;
    padding-top:6px;
    padding-right:6px;
    background-color:#d94983;
    color:#ffffff;
    border-top-right-radius:20px;
    border-top-left-radius:20px;
    border-bottom-left-radius:20px;
    border-bottom-right-radius:0px;
    text-shadow:none;
    margin-left:-2px;
    padding-left:6px;
    font-family:'Waiting for the Sunrise', handwriting;
    position:relative;
    box-shadow:none;
}

body #site-header .hp-topbar{
    border-bottom-style:solid;
    border-bottom-width:1px;
    border-bottom-color:#ededed;
}

body .hp-load-more-wrap .hp-load-more span{
    text-transform:uppercase;
}

body .hp-masonry .hp-card-title a{
    font-size:13px;
}

body #site-header .hp-topbar a.hp-logo{
    font-family:'Vampiro One', display;
    font-weight:600;
    top:39px;
    letter-spacing:0;
}

@media (max-width:760px){
    body #site-header .hp-topbar a.hp-logo{
        font-size:25px;
        top:28px;
    }
}

@media (min-width:761px){
    body #site-header .hp-topbar a.hp-logo{
        font-size:26px;
    }
}

body.single-post #content .hentry .hp-single-thumb{
    display:none;
}

body.single-post #content .hp-entry-tags a{
    font-weight:400;
}

body.single-post #content .hentry p:nth-child(4){
    display:none;
}

body.tag #content h1,
body.category #content h1,
body.author #content h1,
body.page-id-133 #content .hentry h1,
body.page-id-3 #content .hentry h1{
    display:none;
}

/* Adult warning popup */
.hp-adult-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.hp-adult-popup.is-visible {
    display: flex;
}

.hp-adult-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
}

.hp-adult-popup__card {
    position: relative;
    width: min(430px, 100%);
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,.08);
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0,0,0,.18);
    padding: 30px 26px 26px;
    text-align: center;
    color: #555555;
}

.hp-adult-popup__badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d94983;
    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.04em;
}

.hp-adult-popup__card h2 {
    margin: 0 0 10px;
    color: #474747;
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -.04em;
    font-weight: 700;
}

.hp-adult-popup__card p {
    margin: 0 auto 22px;
    color: #777777;
    font-size: 14px;
    line-height: 1.65;
}

.hp-adult-popup__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hp-adult-popup__enter,
.hp-adult-popup__exit {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hp-adult-popup__enter {
    background: linear-gradient(135deg, #d94983, #b83868);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(217,73,131,.25);
}

.hp-adult-popup__exit {
    background: #f1f1f1;
    color: #777777;
}

body.hp-adult-popup-open {
    overflow: hidden;
}

/* 760px and smaller screen sizes */
@media (max-width:760px){

	/* Link */
	#site-header .hp-topbar a{
		font-size:25px;
		top:28px;
	}
	
	/* Span Tag */
	.hp-topbar .hp-logo span{
		padding-top:8px !important;
		
	}
	
}


/* HP v1.22 - cleaner logo using Vibur for the second word */
body #site-header .hp-topbar a.hp-logo,
.hp-logo {
    font-family: 'Vampiro One', Arial, Helvetica, sans-serif !important;
    font-weight: 400 !important;
    color: #474747 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-shadow: none !important;
}

body .hp-topbar .hp-logo span,
.hp-logo span {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--hp-pink) !important;
    font-family: 'Vibur', cursive !important;
    font-weight: 400 !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 0 0 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    position: relative !important;
    top: 0 !important;
}

@media (max-width: 760px) {
    body #site-header .hp-topbar a.hp-logo,
    .hp-logo {
        top: 50% !important;
    }
}

/* HP v1.22 - single post image lightbox */
.hp-single-content img {
    cursor: zoom-in;
    transition: filter .18s ease, transform .18s ease;
}

.hp-single-content img:hover {
    filter: brightness(.96);
}

.hp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.hp-lightbox.is-open {
    display: flex;
}

.hp-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(12px);
}

.hp-lightbox__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hp-lightbox__image {
    max-width: min(96vw, 1480px);
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 26px 90px rgba(0,0,0,.22);
    background: #fff;
}

.hp-lightbox__close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #474747;
    box-shadow: 0 12px 34px rgba(0,0,0,.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.hp-lightbox__close:hover,
.hp-lightbox__close:focus-visible {
    color: var(--hp-pink);
    outline: none;
}

body.hp-lightbox-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .hp-lightbox {
        padding: 10px;
    }

    .hp-lightbox__close {
        top: 12px;
        right: 12px;
    }

    .hp-lightbox__image {
        max-width: 96vw;
        max-height: 88vh;
    }
}


/* HP v1.23 - final clean logo: both words use Vibur, uppercase, side by side */
body #site-header .hp-topbar a.hp-logo,
.hp-logo {
    font-family: 'Vibur', cursive !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    color: #474747 !important;
    gap: 0 !important;
    align-items: center !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: geometricPrecision !important;
}

body .hp-topbar .hp-logo span,
.hp-logo span {
    font-family: 'Vibur', cursive !important;
    font-size: inherit !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    color: var(--hp-pink) !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 0 0 1px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    position: relative !important;
    top: 0 !important;
}

@media (max-width: 760px) {
    body #site-header .hp-topbar a.hp-logo,
    .hp-logo {
        font-size: 28px !important;
        top: 50% !important;
    }
}

@media (max-width: 380px) {
    body #site-header .hp-topbar a.hp-logo,
    .hp-logo {
        font-size: 25px !important;
    }
}

/* HP v1.25 - precise logo vertical adjustment + stable ultra-thin category hover line */
body #site-header .hp-topbar a.hp-logo,
.hp-logo {
    top: 50% !important;
    transform: translate(-50%, calc(-50% + 2px)) !important;
}

@media (max-width: 760px) {
    body #site-header .hp-topbar a.hp-logo,
    .hp-logo {
        top: 50% !important;
        transform: translate(-50%, calc(-50% + 2px)) !important;
    }
}

/* Keep the category row perfectly centered: hide the real scrollbar so it never changes layout height. */
.hp-termbar {
    position: relative;
}

.hp-term-scroll {
    scrollbar-width: none !important;
    scrollbar-color: transparent transparent !important;
}

.hp-term-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.hp-term-scroll::-webkit-scrollbar-track,
.hp-term-scroll::-webkit-scrollbar-thumb {
    background: transparent !important;
}

/* Visual-only micro line on hover, no layout shift / no vibration. */
.hp-termbar::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1px;
    border-radius: 999px;
    background: rgba(0,0,0,.10);
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease;
}

.hp-termbar:hover::after {
    opacity: 1;
}

/* HP v1.26 - logo vertical correction + better mobile drawer scroll */
body #site-header .hp-topbar a.hp-logo,
.hp-logo {
    top: calc(50% + 5px) !important;
    transform: translate(-50%, -50%) !important;
}

@media (max-width: 760px) {
    body #site-header .hp-topbar a.hp-logo,
    .hp-logo {
        top: calc(50% + 4px) !important;
        transform: translate(-50%, -50%) !important;
    }

    .hp-drawer {
        top: var(--hp-topbar-height-mobile) !important;
        height: calc(100dvh - var(--hp-topbar-height-mobile)) !important;
        max-height: calc(100dvh - var(--hp-topbar-height-mobile)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .hp-drawer-inner {
        padding-bottom: calc(36px + env(safe-area-inset-bottom)) !important;
    }

    .hp-drawer-useful-menu {
        grid-template-columns: 1fr !important;
    }
}

@supports not (height: 100dvh) {
    @media (max-width: 760px) {
        .hp-drawer {
            height: calc(100vh - var(--hp-topbar-height-mobile)) !important;
            max-height: calc(100vh - var(--hp-topbar-height-mobile)) !important;
        }
    }
}


/* HP v1.27 - popular and friend drawer links open in a new tab automatically */

/* HP v1.28 - mobile ads: show only one 300x250 footer ad and one single ad */
@media (max-width: 760px) {
    .hp-footer-ad-grid > .hp-footer-ad-slot:nth-of-type(n+2),
    .hp-single-ad-wrap > .hp-single-ad-slot:nth-of-type(n+2) {
        display: none !important;
    }

    .hp-footer-ad-grid,
    .hp-single-ad-wrap {
        grid-template-columns: minmax(0, 300px) !important;
        justify-content: center !important;
        justify-items: center !important;
    }

    .hp-footer-ad-slot,
    .hp-single-ad-slot {
        width: 300px !important;
        max-width: calc(100vw - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* Rule34JP adaptation - Chinese frontend, clean dark header and red/gold accent */
.hp-site-header {
    background: #101010 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.hp-topbar {
    background: #101010 !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
}

.hp-site-header.hp-is-scrolled .hp-topbar {
    background: rgba(16,16,16,.96) !important;
    box-shadow: 0 12px 34px rgba(0,0,0,.28) !important;
}

.hp-icon-btn {
    color: #ffffff !important;
}

.hp-icon-btn:hover,
.hp-icon-btn:focus-visible {
    background: rgba(222,41,16,.20) !important;
}

.hp-burger-lines span {
    background: #ffffff !important;
}

.hp-termbar {
    background: #151515 !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
}

.hp-term-pill {
    background: #242424 !important;
    color: #d6d6d6 !important;
    border: 1px solid rgba(255,255,255,.05);
}

.hp-term-pill:hover {
    background: var(--hp-pink) !important;
    color: #ffffff !important;
    border-color: var(--hp-pink) !important;
}

.hp-termbar::after {
    background: rgba(188,0,45,.36) !important;
}

body #site-header .hp-topbar a.hp-logo-rule34jp,
.hp-logo-rule34jp {
    top: 50% !important;
    transform: translate(-50%, calc(-50% + 1px)) !important;
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 0 !important;
    font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif !important;
    line-height: 1 !important;
    letter-spacing: -0.065em !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

.hp-logo-rule34jp strong,
.hp-logo-rule34jp i,
.hp-logo-rule34jp b {
    font-family: inherit !important;
}

.hp-logo-word,
.hp-logo-number {
    display: inline-block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 31px !important;
    font-weight: 900 !important;
    font-style: normal !important;
    line-height: .92 !important;
    color: #ffffff !important;
}

.hp-logo-number {
    position: relative !important;
    color: var(--hp-pink) !important;
    margin-left: 2px !important;
    letter-spacing: -0.075em !important;
}

.hp-logo-jp {
    position: absolute !important;
    top: -15px !important;
    right: -30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 22px !important;
    padding: 0 6px 0 17px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    font-style: normal !important;
    letter-spacing: .03em !important;
    line-height: 1 !important;
    border: 1px solid rgba(255,255,255,.52) !important;
    box-shadow: 0 8px 18px rgba(188,0,45,.24) !important;
    transform: rotate(5deg) !important;
}

.hp-logo-jp::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--hp-pink);
    transform: translateY(-50%);
}

.hp-logo-jp::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: -3px;
    width: 8px;
    height: 5px;
    background: #ffffff;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: .95;
}

.hp-logo-jp b {
    display: none !important;
}

.hp-load-more,
.hp-nav-card,
.hp-adult-popup__enter,
.hp-drawer-section-top .hp-drawer-menu li:first-child a,
.hp-drawer-section-top .hp-fallback-menu li:first-child a {
    background: linear-gradient(135deg, var(--hp-pink), var(--hp-pink-2)) !important;
}

.hp-load-more,
.hp-nav-card,
.hp-adult-popup__enter {
    box-shadow: 0 12px 28px rgba(188,0,45,.22) !important;
}

.hp-search-submit,
.hp-pagination .current,
.hp-pagination .page-numbers:hover {
    background: #101010 !important;
}

.hp-card-title,
.hp-single-title,
.hp-related-head h2,
.hp-archive-title {
    color: #3f3f3f !important;
}

.hp-card-term,
.hp-entry-tags a:hover,
.hp-lightbox__close:hover,
.hp-lightbox__close:focus-visible {
    color: var(--hp-pink) !important;
}

.hp-adult-popup__badge {
    background: var(--hp-pink) !important;
    color: #ffffff !important;
}

@media (max-width: 760px) {
    body #site-header .hp-topbar a.hp-logo-rule34jp,
    .hp-logo-rule34jp {
        transform: translate(-50%, calc(-50% + 1px)) !important;
    }

    .hp-logo-word,
    .hp-logo-number {
        font-size: 26px !important;
    }

    .hp-logo-jp {
        top: -12px !important;
        right: -27px !important;
        min-width: 31px !important;
        height: 19px !important;
        font-size: 8px !important;
        padding: 0 5px 0 15px !important;
    }

    .hp-logo-jp::before {
        left: 5px;
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 380px) {
    .hp-logo-word,
    .hp-logo-number {
        font-size: 23px !important;
    }

    .hp-logo-jp {
        right: -25px !important;
    }
}
