/*
Theme Name:   Sakura Child
Theme URI:    https://yoursite.com
Description:  Child theme for GeneratePress - Japanese style adult image board
Author:       You
Template:     generatepress
Version:      1.0.0
Text Domain:  sakura-child
*/

/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=M+PLUS+1p:wght@700;800&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --color-accent:       #cc0033;
    --color-accent-dark:  #990022;
    --color-accent-cta:   #ffdd00;
    --color-bg:           #ffffff;
    --color-bg-sub:       #f5f5f5;
    --color-bg-dark:      #1a1a1a;
    --color-bg-darker:    #111111;
    --color-border:       #dddddd;
    --color-border-light: #eeeeee;
    --color-text:         #111111;
    --color-text-muted:   #666666;
    --color-text-link:    #1155cc;
    --color-text-white:   #ffffff;
    --color-new-badge:    #0066cc;
    --color-hot-badge:    #ff6600;
    --font-main:          'Noto Sans JP', sans-serif;
    --font-display:       'M PLUS 1p', sans-serif;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-size: 12px;
    color: var(--color-text);
    background: var(--color-bg-sub);
    line-height: 1.5;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

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

/* ============================================================
   GENERATEPRESS OVERRIDES
   strip out GP defaults we don't need
   ============================================================ */
.site-header,
.main-navigation,
.site-footer {
    display: none;
}

/* Free the layout from GeneratePress's centered fixed-width container.
   Without this, the whole site is locked to GP's container max-width
   (~1100-1200px) and sits in a centered column, which looks "fixed size".
   Forcing the wrappers full-width lets the self-contained topbar/nav/footer
   span the viewport and the grids respond to the available width. */
#page,
#content,
.site-content,
.content-area,
.site-main,
#main,
.inside-article,
.entry-content,
.page-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    float: none;
}

/* GP wraps content in a flex/grid container with gutters - kill the gap */
#content.site-content {
    display: block;
}

/* ============================================================
   SITE WRAPPER
   ============================================================ */
.sp-site {
    background: var(--color-bg);
    min-height: 100vh;
    max-width: 1280px;   /* center on wide PC monitors instead of stretching edge-to-edge */
    margin: 0 auto;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);  /* lift the centered column off the gutters */
}

/* ============================================================
   TOP BAR
   ============================================================ */
.sp-topbar {
    background: var(--color-accent);
    padding: 4px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sp-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    color: var(--color-text-white);
    letter-spacing: 1px;
    text-decoration: none;
}

.sp-logo:hover {
    color: var(--color-accent-cta);
    text-decoration: none;
}

.sp-logo span {
    color: var(--color-accent-cta);
}

.sp-topbar-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.sp-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-topbar-count {
    font-size: 10px;
    color: var(--color-accent-cta);
}

.sp-btn {
    background: var(--color-bg);
    color: var(--color-accent);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-main);
    padding: 3px 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.sp-btn:hover {
    background: var(--color-bg-sub);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-btn-cta {
    background: var(--color-accent-cta);
    color: var(--color-text);
}

.sp-btn-cta:hover {
    background: #eecc00;
    color: var(--color-text);
}

/* ============================================================
   NAV BAR
   ============================================================ */
.sp-navbar {
    background: var(--color-bg-dark);
    display: flex;
    align-items: stretch;
    gap: 0;
    /* Fixed height so the bar looks identical whether or not a
       (taller) search box is present on the page. */
    min-height: 34px;
}

.sp-navbar-links {
    display: flex;
    flex: 1;
    min-width: 0;                      /* let the links block shrink below content width */
    flex-wrap: nowrap;                 /* stay one line… */
    overflow-x: auto;                  /* …and scroll/swipe when items don't fit
                                          (instead of overflowing the viewport and
                                          leaving a right-side gutter ~601–687px) */
    -webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
    scrollbar-width: none;             /* hide the scrollbar (Firefox) */
}
.sp-navbar-links::-webkit-scrollbar { display: none; } /* hide the scrollbar (WebKit) */

/* Keep the WP-generated emoji image (e.g. ▶) from inflating link height */
.sp-nav-item img.emoji {
    width: 1em;
    height: 1em;
    margin: 0 0.25em 0 0;
    vertical-align: -0.1em;
}

.sp-nav-item {
    color: #eeeeee;
    font-size: 11px;
    font-family: var(--font-main);
    padding: 6px 12px;
    cursor: pointer;
    border-right: 1px solid #333333;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex: 0 0 auto;   /* keep natural width so the row scrolls rather than squishing */
    transition: background 0.1s;
}

.sp-nav-item:hover {
    background: var(--color-accent);
    color: var(--color-text-white);
    text-decoration: none;
}

.sp-nav-item.active {
    background: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 700;
}

.sp-nav-search {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--color-bg-dark);
}

.sp-nav-search input {
    font-size: 11px;
    font-family: var(--font-main);
    padding: 3px 8px;
    border: 1px solid #444444;
    background: #333333;
    color: #eeeeee;
    width: 250px;
    outline: none;
}

.sp-nav-search input::placeholder {
    color: #888888;
}

.sp-nav-search input:focus {
    border-color: var(--color-accent);
}

.sp-search-btn {
    background: var(--color-accent);
    color: var(--color-text-white);
    font-size: 11px;
    font-family: var(--font-main);
    padding: 3px 10px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.sp-search-btn:hover {
    background: var(--color-accent-dark);
}

/* ============================================================
   TAG FILTER ROW
   ============================================================ */
.sp-tagrow {
    background: var(--color-bg-sub);
    border-bottom: 1px solid var(--color-border);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;   /* single line: [label] [scrollable tags] [tools] */
}

.sp-tagrow-label {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-right: 2px;
    white-space: nowrap;
    flex: 0 0 auto;      /* label stays fixed */
}

/* The tags scroll/swipe horizontally instead of wrapping to 2+ rows. */
.sp-tagrow-scroll {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox */
}
.sp-tagrow-scroll::-webkit-scrollbar { display: none; } /* WebKit */

.sp-tag {
    background: var(--color-bg);
    border: 1px solid #cccccc;
    color: var(--color-text);
    font-size: 10px;
    font-family: var(--font-main);
    padding: 2px 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;   /* keep each chip on one line */
    flex: 0 0 auto;        /* don't shrink → the row scrolls instead of squishing */
    transition: border-color 0.1s, color 0.1s;
}

.sp-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-tag.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 700;
}

/* Divider between media-type tabs and sort tabs in the nav */
.sp-nav-sep {
    display: inline-block;
    width: 1px;
    align-self: stretch;
    margin: 0 6px;
    background: var(--color-border);
}

/* Multi-tag filter controls (AND/OR toggle + clear) */
.sp-tagrow-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding-left: 8px;
    flex: 0 0 auto;   /* tools (AND/OR + clear) stay fixed at the end */
}

.sp-tag-op,
.sp-tag-clear {
    font-size: 10px;
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.sp-tag-op {
    background: #fff8e1; /* faint yellow accent = active filter mode */
    border-color: var(--color-accent);
    color: var(--color-accent);
    font-weight: 700;
}

.sp-tag-op:hover { background: var(--color-accent); color: var(--color-text-white); }

.sp-tag-clear { color: var(--color-text-muted); background: var(--color-bg); }
.sp-tag-clear:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.sp-main {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sp-sidebar {
    width: 210px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border);
    background: var(--color-bg);
}

.sp-side-section {
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 6px;
    margin-bottom: 0;
}

.sp-side-head {
    background: var(--color-bg-dark);
    color: var(--color-text-white);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-main);
    padding: 4px 8px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.sp-side-head.red {
    background: var(--color-accent);
}

/* Clickable post-type header in the grouped browse nav. */
a.sp-side-head-link {
    display: block;
    text-decoration: none;
    color: var(--color-text-white);
}
a.sp-side-head-link:hover {
    background: var(--color-accent);
    text-decoration: none;
    color: var(--color-text-white);
}
a.sp-side-head-link.active {
    background: var(--color-accent);
}

/* Categories nested under a type header. */
.sp-side-link.sp-side-sub {
    padding-left: 16px;
}

.sp-side-link {
    display: block;
    padding: 3px 8px;
    font-size: 11px;
    color: var(--color-text-link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: color 0.1s, background 0.1s;
}

.sp-side-link:hover {
    color: var(--color-accent);
    background: #fff5f5;
    text-decoration: none;
}

.sp-side-link.active {
    color: var(--color-accent);
    background: #fff5f5;
    font-weight: 700;
    border-left: 3px solid var(--color-accent);
    padding-left: 5px;
}

.sp-side-rank {
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding: 2px 8px;
}

.sp-rank-num {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-accent);
    min-width: 14px;
    flex-shrink: 0;
}

.sp-rank-title {
    font-size: 11px;
    color: var(--color-text-link);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.sp-rank-title:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.sp-content {
    flex: 1;
    min-width: 0;
    padding: 8px;
    background: var(--color-bg);
}

/* ============================================================
   SECTION BAR
   ============================================================ */
.sp-section-bar {
    background: #2a2a2a;
    color: var(--color-text-white);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-main);
    padding: 4px 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-section-bar-sub {
    font-size: 10px;
    color: #aaaaaa;
    font-weight: 400;
    cursor: pointer;
}

.sp-section-bar-sub:hover {
    color: var(--color-accent-cta);
}

/* ============================================================
   PICKUP ROW
   ============================================================ */
.sp-pickup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.sp-pickup-card {
    display: flex;
    gap: 6px;
    border: 1px solid var(--color-border);
    padding: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.1s;
}

.sp-pickup-card:hover {
    border-color: var(--color-accent);
    text-decoration: none;
}

.sp-pickup-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    object-fit: cover;
    background: #e0e0e0;
}

.sp-pickup-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.sp-pickup-title {
    font-size: 11px;
    color: var(--color-text);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sp-pickup-user {
    font-size: 10px;
    color: var(--color-text-muted);
}

.sp-pickup-stat {
    font-size: 10px;
    color: var(--color-accent);
}

/* ============================================================
   MAIN CARD GRID
   ============================================================ */
.sp-grid {
    display: grid;
    /* minmax(0,1fr) lets every column shrink equally; without the 0 a long
       unbreakable tag would blow out its column and misalign the grid. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

/* ============================================================
   POST CARD
   ============================================================ */
.sp-card {
    border: 1px solid var(--color-border);
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: border-color 0.1s;
    background: var(--color-bg);
    min-width: 0;       /* grid items default to min-width:auto → long tags blow out the column */
    overflow: hidden;   /* keep any wide child clipped inside the card box */
}

.sp-card:hover {
    border-color: var(--color-accent);
    text-decoration: none;
}

.sp-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
}

.sp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.sp-card:hover .sp-card-thumb img {
    transform: scale(1.04);
}

.sp-badge {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-main);
    padding: 2px 5px;
    line-height: 1;
    letter-spacing: 0.3px;
}

.sp-badge-new {
    background: var(--color-new-badge);
    color: var(--color-text-white);
}

.sp-badge-hot {
    background: var(--color-hot-badge);
    color: var(--color-text-white);
}

.sp-badge-pickup {
    background: var(--color-accent);
    color: var(--color-text-white);
}

.sp-card-views {
    position: absolute;
    bottom: 3px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-text-white);
    font-size: 9px;
    padding: 1px 4px;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* image-set count (bottom-left of thumb) */
.sp-card-count {
    position: absolute;
    bottom: 3px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-text-white);
    font-size: 9px;
    padding: 1px 4px;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* premium marker (top-right of thumb) */
.sp-card-premium {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-accent-cta);
    color: var(--color-text);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 5px;
    line-height: 1;
}

.sp-card-info {
    padding: 4px 5px 5px;
}

.sp-card-title {
    font-size: 11px;
    color: var(--color-text);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 3px;
}

.sp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}

.sp-card-user {
    font-size: 10px;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-card-likes {
    font-size: 10px;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.sp-card-tags {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;   /* single line */
    overflow: hidden;    /* clip overflow INSIDE the card's content box (within padding) */
    max-width: 100%;
}

.sp-card-tag {
    background: var(--color-bg-sub);
    color: var(--color-text-muted);
    font-size: 9px;
    padding: 1px 5px;
    flex: 0 0 auto;       /* keep each tag's natural size; whole tags get clipped, not squished */
    white-space: nowrap;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.sp-pager {
    display: flex;
    gap: 2px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sp-pager a,
.sp-pager span {
    background: var(--color-bg-sub);
    border: 1px solid #cccccc;
    color: var(--color-text);
    font-size: 11px;
    font-family: var(--font-main);
    padding: 3px 9px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.1s, border-color 0.1s;
}

.sp-pager a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-pager .current,
.sp-pager span.current {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 700;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.sp-footer {
    background: var(--color-bg-darker);
    color: #888888;
    font-size: 10px;
    text-align: center;
    padding: 12px 8px;
    margin-top: 16px;
    border-top: 2px solid var(--color-accent);
}

.sp-footer a {
    color: #aaaaaa;
    text-decoration: none;
    margin: 0 6px;
}

.sp-footer a:hover {
    color: var(--color-accent-cta);
    text-decoration: none;
}

/* ============================================================
   PRICING / PREMIUM PAGE
   ============================================================ */
.sp-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.sp-plan {
    position: relative;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
}

.sp-plan.featured {
    border: 2px solid var(--color-accent);
    box-shadow: 0 2px 10px rgba(204, 0, 51, 0.12);
}

.sp-plan-tag {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
}

.sp-plan-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

.sp-plan-price {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--color-accent);
    margin: 6px 0;
    line-height: 1;
}

.sp-plan-price span {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.sp-plan-note {
    font-size: 10px;
    color: #2e7d32;
    background: #e8f5e9;
    display: inline-block;
    padding: 1px 6px;
    margin-bottom: 6px;
}

.sp-plan-feats {
    list-style: none;
    padding: 0;
    margin: 10px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text);
    flex: 1;
}

.sp-plan-feats li.muted {
    color: #bbbbbb;
}

.sp-plan-btn {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-main);
    padding: 9px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-sub);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 0.1s, color 0.1s, background 0.1s;
}

.sp-plan-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-plan-btn.primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
}

.sp-plan-btn.primary:hover {
    background: var(--color-accent-dark);
    color: var(--color-text-white);
}

.sp-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 18px 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sp-support-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    max-width: 160px;
}

.sp-support-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.sp-support-text {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.sp-support-arrow {
    font-size: 20px;
    color: #cccccc;
}

.sp-pricing-fineprint {
    font-size: 10px;
    color: var(--color-text-muted);
    text-align: center;
    padding: 8px;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.sp-404 {
    text-align: center;
    padding: 48px 16px;
    background: var(--color-bg);
}

.sp-404-code {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.sp-404-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 8px;
}

.sp-404-text {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.sp-404-search {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 16px auto 0;
    max-width: 360px;
}

.sp-404-search .sp-field-input {
    flex: 1;
}

.sp-404-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

/* ============================================================
   SINGLE POST PAGE
   ============================================================ */
.sp-single-wrap {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.sp-single-main {
    flex: 1;
    min-width: 0;
    padding: 8px;
}

.sp-single-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.sp-single-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 6px;
}

.sp-single-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sp-single-meta-item {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.sp-single-meta-item a {
    color: var(--color-text-link);
}

.sp-single-meta-item a:hover {
    color: var(--color-accent);
}

.sp-single-image-wrap {
    background: #111111;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden; /* clip the scaled-up blurred backdrop */
}

/* Fill the dead space beside portrait / short images with a blurred,
   darkened copy of the image instead of flat black bars. The image URL
   is passed in via the --sp-img custom property (set inline in
   single-ph-feet.php). Falls back to plain black when there's no image. */
.sp-single-image-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--sp-img, none);
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(0.45) saturate(1.2);
    transform: scale(1.15); /* push the blur's soft edges out of frame */
    z-index: 0;
    pointer-events: none;
}

.sp-single-image-wrap img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: inline-block;
}

/* ---- Video / Voice media stages (single page) ---- */
.sp-media-stage {
    position: relative;
    background: #111111;
    margin-bottom: 10px;
}

.sp-video {
    display: block;
    width: 100%;
    max-height: 80vh;
    background: #000000;
}

/* "preview / locked" ribbon over a player */
.sp-media-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
}

/* Poster placeholder when no media file exists yet */
.sp-media-placeholder {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.sp-media-placeholder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}
.sp-media-placeholder-note {
    position: relative;
    z-index: 1;
    color: #ffffff;
    background: rgba(0,0,0,0.55);
    padding: 8px 14px;
    font-size: 13px;
}

/* Voice: cover banner + audio control */
.sp-voice-stage {
    background: var(--color-bg-sub);
    border: 1px solid var(--color-border);
}
.sp-voice-cover {
    position: relative;
    height: 200px;
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-voice-icon {
    width: 64px;
    height: 64px;
    color: #ffffff;
    opacity: 0.92;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.sp-voice-icon svg { width: 100%; height: 100%; }
.sp-voice-duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
}
.sp-voice-player {
    padding: 12px;
}
.sp-audio {
    width: 100%;
}

/* ---- Gallery (multi-image set) ---- */
.sp-gallery {
    margin-bottom: 10px;
}

.sp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.sp-thumb {
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    background: #e8e8e8;
    overflow: hidden;
    position: relative;
    display: block;
    cursor: pointer;
}

.sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-thumb:hover,
.sp-thumb.active {
    border-color: var(--color-accent);
}

.sp-thumb.locked img {
    filter: blur(4px) brightness(0.8);
}

.sp-thumb-lock {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
}

.sp-thumb-lock svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

/* ---- Premium gate ---- */
.sp-lock-panel {
    margin-top: 10px;
    border: 1px solid var(--color-border);
    background: linear-gradient(180deg, #ffffff, var(--color-bg-sub));
    text-align: center;
    padding: 24px 16px;
}

.sp-lock-icon {
    line-height: 0;
}

.sp-lock-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-accent);
}

.sp-lock-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 6px;
}

.sp-lock-text {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.sp-lock-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.sp-lock-btn {
    font-size: 12px;
    font-family: var(--font-main);
    padding: 8px 18px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.1s, color 0.1s, background 0.1s;
}

.sp-lock-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-lock-btn.primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
}

.sp-lock-btn.primary:hover {
    background: var(--color-accent-dark);
    color: var(--color-text-white);
}

.sp-action-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sp-action-btn {
    background: var(--color-bg-sub);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 11px;
    font-family: var(--font-main);
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: border-color 0.1s, color 0.1s;
    text-decoration: none;
}

.sp-action-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

/* Active (toggled-on) states for like / favourite */
.sp-action-btn.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.sp-action-btn.like.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
}

.sp-action-btn.like.active:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-text-white);
}

.sp-action-btn.fav.active {
    background: var(--color-accent-cta);
    border-color: var(--color-accent-cta);
    color: var(--color-text);
}

/* Favorite icon + label are driven entirely by the .active class so engagement.js
   (which only toggles .active/aria-pressed) stays the single source of truth — no
   per-button JS, no click/AJAX race. */
.sp-action-btn.fav .sp-act-ico::before { content: "\2606"; }        /* ☆ */
.sp-action-btn.fav.active .sp-act-ico::before { content: "\2605"; } /* ★ */
.sp-action-btn.fav .sp-act-txt::before { content: "お気に入り"; }
.sp-action-btn.fav.active .sp-act-txt::before { content: "保存済み"; }

/* Follow button label swaps on .active the same way. */
.sp-follow-btn::before { content: "フォローする"; }
.sp-follow-btn.active { background: #888; }
.sp-follow-btn.active::before { content: "フォロー中"; }

/* Theme the pointy like button so it matches our action buttons.
   (Pointy renders .ps-pointy-like-wrapper > .like-container > .like-button;
   the selected-state colors come from pointy's per-type display settings.) */
.sp-action-row .ps-pointy-like-wrapper {
    margin: 0 !important;
    display: inline-flex;
}

.sp-action-row .ps-pointy-like-wrapper .like-container {
    display: flex;
    gap: 6px;
}

.sp-action-row .ps-pointy-like-wrapper .like-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg-sub);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 11px;
    font-family: var(--font-main);
    height: auto;
    min-width: 0;
    padding: 5px 12px;
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.1s, color 0.1s;
}

.sp-action-row .ps-pointy-like-wrapper .like-button:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Author's writeup (post_content) shown under the media. */
.sp-single-body {
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text);
    padding: 10px 2px;
    margin: 8px 0;
    border-top: 1px solid var(--color-border-light);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.sp-single-body p { margin: 0 0 0.8em; }
.sp-single-body p:last-child { margin-bottom: 0; }
.sp-single-body a { color: var(--color-text-link); text-decoration: underline; }
.sp-single-body img { max-width: 100%; height: auto; }

.sp-single-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 10px;
}

.sp-single-tags-label {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* ============================================================
   SAME-USER PREV / NEXT BAR
   ============================================================ */
.sp-postnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
}

.sp-postnav-btn {
    background: var(--color-bg-sub);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 11px;
    font-family: var(--font-main);
    padding: 6px 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.1s, color 0.1s;
}

.sp-postnav-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-postnav-btn.disabled {
    color: #bbbbbb;
    border-color: var(--color-border-light);
    cursor: default;
    pointer-events: none;
}

.sp-postnav-user {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--color-text-link);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-postnav-user:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.sp-related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

/* ============================================================
   AD SLOT
   ============================================================ */
.sp-ad-slot {
    background: var(--color-bg-sub);
    border: 1px dashed #cccccc;
    text-align: center;
    color: #bbbbbb;
    font-size: 10px;
    padding: 8px;
    margin-bottom: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   HERO BANNER (homepage)
   ============================================================ */
.sp-hero {
    background: var(--color-bg-darker);
    border-bottom: 3px solid var(--color-accent);
    padding: 20px 12px;
}

.sp-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* fill the banner so the stats sit at the right edge (no dead space on PC) */
    max-width: 100%;
}

.sp-hero-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text-white);
    margin-bottom: 4px;
}

.sp-hero-sub {
    font-size: 11px;
    color: #aaaaaa;
    margin-bottom: 12px;
}

.sp-hero-btns {
    display: flex;
    gap: 6px;
}

.sp-hero-btn-main {
    background: var(--color-accent);
    color: var(--color-text-white);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 18px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.1s;
}

.sp-hero-btn-main:hover {
    background: var(--color-accent-dark);
    color: var(--color-text-white);
    text-decoration: none;
}

.sp-hero-btn-sub {
    background: transparent;
    border: 1px solid #444444;
    color: #cccccc;
    font-family: var(--font-main);
    font-size: 12px;
    padding: 7px 18px;
    text-decoration: none;
    display: inline-block;
    transition: border-color 0.1s;
}

.sp-hero-btn-sub:hover {
    border-color: #888888;
    color: var(--color-text-white);
    text-decoration: none;
}

/* hero center media slot (fills the dead space on PC) */
.sp-hero-media {
    flex: 1 1 0;
    min-width: 0;
    max-width: 560px;
    align-self: stretch;   /* match the hero height so it crops cleanly */
    display: block;
    text-decoration: none;
}

.sp-hero-media:hover .sp-hero-img-ph {
    border-color: var(--color-accent);
    color: #aaaaaa;
}

.sp-hero-img,
.sp-hero-img-ph {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.sp-hero-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* candy-stripe so it reads as a placeholder, not a broken image */
    background: repeating-linear-gradient(45deg, #2a2a2a, #2a2a2a 10px, #262626 10px, #262626 20px);
    border: 1px dashed #555555;
    color: #888888;
    font-size: 11px;
    line-height: 1.5;
}

.sp-hero-img-ph small {
    color: #666666;
    font-size: 10px;
}

.sp-hero-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.sp-hero-stat {
    text-align: center;
}

.sp-hero-stat-num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--color-accent-cta);
    line-height: 1;
}

.sp-hero-stat-label {
    font-size: 10px;
    color: #888888;
    margin-top: 2px;
}

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.sp-auth-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-sub);
    padding: 24px 12px;
}

.sp-auth-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 400px;
    padding: 28px 24px;
}

.sp-auth-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 4px;
}

.sp-auth-logo span {
    color: var(--color-accent-cta);
}

.sp-auth-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 4px;
}

.sp-auth-desc {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.sp-auth-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: var(--color-accent);
    font-size: 11px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.sp-auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.sp-auth-submit {
    background: var(--color-accent);
    color: var(--color-text-white);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: background 0.1s;
    margin-top: 4px;
}

.sp-auth-submit:hover {
    background: var(--color-accent-dark);
}

.sp-auth-alt {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
}

.sp-auth-link {
    color: var(--color-accent);
    text-decoration: none;
}

.sp-auth-link:hover {
    text-decoration: underline;
    color: var(--color-accent-dark);
}

/* ============================================================
   FORM FIELDS (shared)
   ============================================================ */
.sp-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sp-field-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text);
}

.sp-field-input {
    font-family: var(--font-main);
    font-size: 12px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid #cccccc;
    padding: 6px 8px;
    outline: none;
    transition: border-color 0.1s;
    width: 100%;
}

.sp-field-input:focus {
    border-color: var(--color-accent);
}

.sp-field-textarea {
    resize: vertical;
    min-height: 80px;
}

.sp-field-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    cursor: pointer;
}

.sp-field-hint {
    font-size: 10px;
    color: #999999;
}

.sp-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sp-checkbox-label {
    font-size: 11px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.sp-required {
    color: var(--color-accent);
    font-size: 10px;
}

/* ============================================================
   ALERT BANNERS
   ============================================================ */
.sp-alert {
    font-size: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.sp-alert-success {
    background: #f0fff4;
    border: 1px solid #b2dfdb;
    color: #2e7d52;
}

.sp-alert-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: var(--color-accent);
}

/* ============================================================
   DASHBOARD (mypage)
   ============================================================ */
.sp-dashboard-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px;
}

.sp-dash-header {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.sp-dash-avatar .sp-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
}

.sp-dash-user-info {
    flex: 1;
    min-width: 0;
}

.sp-dash-username {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1px;
}

.sp-dash-display {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 3px;
}

.sp-dash-bio {
    font-size: 11px;
    color: #555555;
    line-height: 1.5;
}

.sp-dash-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.sp-dash-stat {
    text-align: center;
}

.sp-dash-stat-num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.sp-dash-stat-label {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.sp-dash-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-accent);
    margin-bottom: 12px;
    gap: 0;
}

.sp-dash-tab {
    font-size: 12px;
    font-family: var(--font-main);
    color: var(--color-text-muted);
    padding: 7px 16px;
    border: 1px solid var(--color-border);
    border-bottom: none;
    margin-bottom: -2px;
    text-decoration: none;
    background: var(--color-bg-sub);
    transition: color 0.1s, background 0.1s;
}

.sp-dash-tab:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.sp-dash-tab.active {
    background: var(--color-bg);
    color: var(--color-accent);
    font-weight: 700;
    border-bottom-color: var(--color-bg);
}

.sp-dash-body {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: none;
    padding: 12px;
    min-height: 200px;
}

.sp-dash-post-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-dash-post-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--color-border-light);
    transition: border-color 0.1s;
}

.sp-dash-post-row:hover {
    border-color: var(--color-accent);
}

.sp-dash-post-thumb {
    width: 64px;
    height: 48px;
    flex-shrink: 0;
    background: #e8e8e8;
    overflow: hidden;
}

.sp-dash-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-dash-post-info {
    flex: 1;
    min-width: 0;
}

.sp-dash-post-title {
    font-size: 12px;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
}

.sp-dash-post-title a {
    color: var(--color-text);
    text-decoration: none;
}

.sp-dash-post-title a:hover {
    color: var(--color-accent);
}

.sp-dash-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.sp-dash-post-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.sp-status-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
}

.sp-status-publish { background: #e8f5e9; color: #2e7d32; }
.sp-status-pending { background: #fff8e1; color: #f57f17; }
.sp-status-draft   { background: #f5f5f5; color: #888888; }
.sp-status-private { background: #fce4ec; color: #880e4f; }

.sp-btn-sm {
    font-size: 10px;
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg-sub);
    border: 1px solid var(--color-border);
    padding: 3px 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: border-color 0.1s, color 0.1s;
}

.sp-btn-sm:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-btn-sm-red {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
}

.sp-btn-sm-red:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-text-white);
}

.sp-profile-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 440px;
}

.sp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--color-text-muted);
}

.sp-empty-icon { font-size: 32px; }
.sp-empty-text { font-size: 12px; }

/* ============================================================
   PUBLIC PROFILE (author.php)
   ============================================================ */
.sp-profile-header {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.sp-profile-avatar .sp-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
}

.sp-profile-info {
    flex: 1;
    min-width: 0;
}

.sp-profile-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.sp-profile-login {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 3px;
}

.sp-profile-bio {
    font-size: 11px;
    color: #555555;
    line-height: 1.5;
}

.sp-profile-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.sp-profile-stat { text-align: center; }

.sp-profile-stat-num {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.sp-profile-stat-label {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* ============================================================
   UPLOAD PAGE
   ============================================================ */
.sp-upload-wrap {
    min-height: calc(100vh - 120px);
    background: var(--color-bg-sub);
    padding: 20px 12px;
    display: flex;
    justify-content: center;
}

.sp-upload-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 560px;
    padding: 24px;
}

.sp-upload-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
}

.sp-upload-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-dropzone {
    border: 2px dashed #cccccc;
    background: var(--color-bg-sub);
    cursor: pointer;
    position: relative;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.sp-dropzone:hover,
.sp-dropzone.dragover {
    border-color: var(--color-accent);
    background: #fff5f5;
}

.sp-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.sp-dropzone-inner {
    text-align: center;
    pointer-events: none;
}

.sp-dropzone-icon { font-size: 28px; margin-bottom: 6px; }

.sp-dropzone-text {
    font-size: 12px;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 3px;
}

.sp-dropzone-hint {
    font-size: 10px;
    color: var(--color-text-muted);
}

.sp-preview-img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

/* multi-image upload previews */
.sp-upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 6px;
}

.sp-upload-previews:empty {
    display: none;
}

.sp-upload-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #e8e8e8;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.sp-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The uploader always sees their own image clearly - no blur here.
   The blur only applies to non-members on the public single page. */
.sp-upload-thumb.locked {
    border-color: var(--color-accent);
    box-shadow: inset 0 0 0 1px var(--color-accent);
}

.sp-upload-note {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.5;
}

.sp-upload-cover {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
}

.sp-upload-locked {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: var(--color-accent-cta);
    color: var(--color-text);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
}

.sp-upload-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-upload-remove:hover {
    background: var(--color-accent);
}

.sp-tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.sp-tag-suggest {
    background: var(--color-bg-sub);
    border: 1px solid #cccccc;
    color: var(--color-text-muted);
    font-size: 10px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.1s;
}

.sp-tag-suggest:hover,
.sp-tag-suggest.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
}

.sp-upload-rules {
    background: var(--color-bg-sub);
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    font-size: 11px;
}

.sp-upload-rules-title {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 5px;
}

.sp-upload-rules ul {
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--color-text-muted);
}

/* ============================================================
   AGE GATE (18+ modal)
   ============================================================ */
.sp-agegate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sp-agegate[hidden] {
    display: none;
}

.sp-agegate-box {
    background: var(--color-bg);
    border-top: 4px solid var(--color-accent);
    max-width: 380px;
    width: 100%;
    padding: 28px 24px;
    text-align: center;
}

.sp-agegate-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-accent);
}

.sp-agegate-logo span {
    color: var(--color-accent-cta);
}

.sp-agegate-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 10px;
}

.sp-agegate-text {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.sp-agegate-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.sp-agegate-btn {
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 700;
    padding: 11px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-sub);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
}

.sp-agegate-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.sp-agegate-btn.primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-white);
}

.sp-agegate-btn.primary:hover {
    background: var(--color-accent-dark);
    color: var(--color-text-white);
}

.sp-agegate-fine {
    font-size: 10px;
    color: #999999;
    margin-top: 12px;
}

/* ============================================================
   GENERIC MODAL (report, etc.)
   ============================================================ */
.sp-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sp-modal[hidden] {
    display: none;
}

.sp-modal-box {
    background: var(--color-bg);
    border-top: 4px solid var(--color-accent);
    max-width: 380px;
    width: 100%;
    padding: 20px;
}

.sp-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.sp-modal-text {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.sp-report-reasons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
}

.sp-report-reasons label {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sp-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

/* ============================================================
   MOBILE NAV TOGGLE (hamburger) - shown only on small screens
   ============================================================ */
.sp-nav-toggle {
    display: none;
}

/* ============================================================
   CREATOR EARNINGS (mypage)
   ============================================================ */
.sp-earn-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.sp-earn-card {
    border: 1px solid var(--color-border);
    background: var(--color-bg-sub);
    padding: 12px;
    text-align: center;
}

.sp-earn-num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.sp-earn-label {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.sp-earn-payout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    padding: 12px;
    border: 1px solid var(--color-border);
    background: #fff8f8;
    flex-wrap: wrap;
}

.sp-earn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 4px;
}

.sp-earn-table th,
.sp-earn-table td {
    border-bottom: 1px solid var(--color-border-light);
    padding: 6px 8px;
    text-align: left;
}

.sp-earn-table th {
    background: var(--color-bg-sub);
    color: var(--color-text-muted);
    font-weight: 700;
}

.sp-earn-table th.num,
.sp-earn-table td.num {
    text-align: right;
}

/* ============================================================
   RESPONSIVE
   Mobile-first tweaks layered on top of the desktop layout above.
   ============================================================ */

/* Tablet / small desktop ----------------------------------- */
@media (max-width: 1100px) {
    .sp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sp-related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Sidebar collapses, layouts go single-column ------------- */
@media (max-width: 900px) {
    .sp-sidebar {
        display: none;
    }

    /* single post no longer needs the side rail to sit beside content */
    .sp-single-wrap {
        display: block;
    }

    .sp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sp-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* hero stacks text above stats */
    .sp-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        max-width: 100%;
    }

    /* media drops into the middle, centered and full-width */
    .sp-hero-media {
        width: 100%;
        max-width: 100%;
        align-self: center;
        margin: 4px 0;
    }

    .sp-hero-img,
    .sp-hero-img-ph {
        min-height: 140px;
    }

    .sp-hero-stats {
        gap: 24px;
    }

    /* dashboard / profile headers stack the stats below the info */
    .sp-dash-header,
    .sp-profile-header {
        flex-wrap: wrap;
    }

    .sp-dash-stats,
    .sp-profile-stats {
        width: 100%;
        justify-content: flex-start;
        gap: 24px;
        margin-top: 4px;
    }
}

/* Phones --------------------------------------------------- */
@media (max-width: 600px) {
    .sp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sp-pickup-grid {
        grid-template-columns: 1fr;
    }

    .sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sp-topbar-sub {
        display: none;
    }

    /* nav bar wraps and the search box drops to its own full-width row */
    .sp-navbar {
        flex-wrap: wrap;
    }

    .sp-navbar-links {
        flex: 1 1 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sp-nav-search {
        flex: 1 1 100%;
    }

    .sp-nav-search form {
        display: flex;
        width: 100%;
        gap: 4px;
    }

    .sp-nav-search input {
        flex: 1;
        width: auto;
    }

    /* hamburger collapses the nav links into a dropdown */
    .sp-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 42px;
        height: 34px;
        padding: 8px 10px;
        background: transparent;
        border: none;
        cursor: pointer;
        order: 0;
    }

    .sp-nav-toggle span {
        display: block;
        height: 2px;
        width: 100%;
        background: #eeeeee;
    }

    .sp-navbar.js-nav .sp-nav-search {
        order: 1;
        flex: 1 1 auto;
    }

    .sp-navbar.js-nav .sp-navbar-links {
        display: none;
        order: 3;
        flex: 1 1 100%;
        flex-direction: column;
        overflow: visible;
    }

    .sp-navbar.js-nav.open .sp-navbar-links {
        display: flex;
    }

    .sp-navbar.js-nav .sp-nav-item {
        border-right: none;
        border-bottom: 1px solid #333333;
    }

    /* let the single-post tabs scroll instead of squashing */
    .sp-dash-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sp-dash-tab {
        white-space: nowrap;
    }

    /* tame the tall single-post image on small screens */
    .sp-single-image-wrap img {
        max-height: 70vh;
    }

    /* pricing plans + earnings cards stack on phones */
    .sp-pricing {
        grid-template-columns: 1fr;
    }

    .sp-earn-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Narrow phones ------------------------------------------- */
@media (max-width: 380px) {
    .sp-grid {
        grid-template-columns: 1fr;
    }

    .sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
