/* ─── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #0b0b10;
    --surface:      #13131c;
    --card:         #1b1b27;
    --card-hover:   #21212f;
    --accent:       #c8384f;
    --accent-light: #e04060;
    --accent-muted: rgba(200,56,79,0.12);
    --text:         #e2e2ea;
    --text-muted:   #7878a0;
    --border:       #27273a;
    --radius:       10px;
    --shadow:       0 8px 32px rgba(0,0,0,0.5);
    --font-serif:   Georgia, "Palatino Linotype", Palatino, serif;
    --font-sans:    "Segoe UI", system-ui, -apple-system, sans-serif;
    --nav-h:        64px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

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

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

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: normal;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: var(--text);
}

/* ─── Navbar ────────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(11,11,16,0.93);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--text);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.nav-brand span { color: var(--accent); }
.nav-brand:hover { color: var(--text); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.2s;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Container ─────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Page Header ───────────────────────────────────────────── */
.page-header {
    padding: 3rem 1.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-header p { color: var(--text-muted); margin-top: 0.5rem; }

.sort-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}
.sort-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.02);
}
.sort-tabs a:hover,
.sort-tabs a.active {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-muted);
}

/* ─── Post Grid (Home) ──────────────────────────────────────── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.post-card a { color: inherit; }
.post-card a:hover { color: inherit; }

.post-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface);
    position: relative;
}
.post-thumb img,
.post-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.post-card:hover .post-thumb img,
.post-card:hover .post-thumb video { transform: scale(1.04); }

.post-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 2.2rem;
    pointer-events: none;
    transition: background 0.2s;
}
.post-card:hover .post-thumb-play {
    background: rgba(200,56,79,0.5);
}

.post-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
    opacity: 0.4;
}

.post-body {
    padding: 1.2rem 1.4rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.post-body h2 {
    font-size: 1.1rem;
    font-family: var(--font-serif);
    line-height: 1.35;
}
.post-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.post-preview {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: auto;
    padding-top: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── About Page ────────────────────────────────────────────── */
.about-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}

.about-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 6px var(--accent-muted);
    display: block;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    white-space: pre-line;
    max-width: 520px;
}

.about-subscribe {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
}

.about-subscribe h2 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.about-subscribe > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Honeypot: clip it completely but keep it in the DOM for bots */
.subscribe-honey {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.subscribe-form { width: 100%; }

.subscribe-row {
    display: flex;
    gap: 0.75rem;
}

.subscribe-names {
    margin-bottom: 0.6rem;
}

.subscribe-input { flex: 1; }

@media (max-width: 480px) {
    .subscribe-row { flex-direction: column; }
    .about-subscribe { padding: 1.5rem 1.2rem; }
}

/* ─── Post View ─────────────────────────────────────────────── */
.post-view {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.post-view h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 0.4rem;
}
.post-view .post-date { margin-bottom: 1.5rem; }

.post-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-line;
    margin-bottom: 2rem;
}

/* ─── Post Gallery ──────────────────────────────────────────── */
.post-gallery {
    background: #000;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.gallery-stage {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 280px;
}

.gallery-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}
.gallery-display img,
.gallery-display video {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}
.gallery-display video { outline: none; width: 100%; }

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, opacity 0.2s;
}
.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }
.gallery-btn:hover { background: rgba(200,56,79,0.8); }
.gallery-btn:disabled { opacity: 0.2; cursor: default; }
.gallery-btn:disabled:hover { background: rgba(0,0,0,0.55); }

.gallery-thumbs {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    overflow-x: auto;
    background: #05050a;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

.gallery-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    padding: 0;
    transition: border-color 0.15s;
    position: relative;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb-video-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.4rem;
}
.gallery-thumb-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 1rem;
    pointer-events: none;
}

/* ─── Comics Grid ───────────────────────────────────────────── */
.comics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.comic-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.comic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.comic-card a { color: inherit; }

.comic-cover {
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--surface);
}
.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.comic-card:hover .comic-cover img { transform: scale(1.04); }

.comic-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-muted);
    opacity: 0.35;
}

.comic-info {
    padding: 0.9rem 1rem 1rem;
}
.comic-info h2 {
    font-size: 0.95rem;
    font-family: var(--font-serif);
    line-height: 1.3;
    margin-bottom: 0.3rem;
}
.comic-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.comic-description {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-top: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comics-grid-featured {
    grid-template-columns: minmax(320px, 760px);
}
.comics-grid-featured .comic-card a {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    align-items: stretch;
}
.comics-grid-featured .comic-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.comics-grid-featured .comic-info h2 {
    font-size: 1.25rem;
}

/* ─── Scroll-to-top Button ──────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s, transform 0.25s, background 0.2s;
}
.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.scroll-top:hover { background: var(--accent-light); }

/* ─── Page-by-page Reader ───────────────────────────────────── */
.pgr {
    display: flex;
    flex-direction: column;
    position: relative;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    background: #000;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.pgr:fullscreen,
.pgr:-webkit-full-screen { height: 100vh; height: 100dvh; }

.pgr-bar {
    flex-shrink: 0;
    height: 48px;
    background: rgba(13,13,18,0.97);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    gap: 0.75rem;
}
.pgr-back {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    flex-shrink: 0;
}
.pgr-back:hover { color: var(--accent); }
.pgr-title {
    flex: 1;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.pgr-counter {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
}
.pgr-info,
.pgr-fs {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s;
}
.pgr-info {
    font-weight: 700;
    font-family: var(--font-serif);
}
.pgr-info:hover,
.pgr-info[aria-expanded="true"],
.pgr-fs:hover {
    color: var(--text);
    border-color: var(--accent);
}
.pgr-info[aria-expanded="true"] {
    background: rgba(200,56,79,0.16);
}

.pgr-info-panel {
    position: absolute;
    top: 48px;
    left: 50%;
    z-index: 20;
    width: min(720px, calc(100% - 1.5rem));
    max-height: min(42vh, 320px);
    overflow: auto;
    transform: translateX(-50%);
    background: rgba(18,18,26,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.42);
    padding: 0.95rem 1.05rem;
    color: var(--text);
    user-select: text;
    -webkit-user-select: text;
}
.pgr-info-panel[hidden] { display: none; }
.pgr-info-heading {
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.pgr-info-panel p {
    margin: 0;
    white-space: pre-line;
    line-height: 1.6;
}

.pgr-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pgr-view {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.pgr-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    will-change: transform;
    transition: opacity 0.1s ease;
    pointer-events: none;
    -webkit-user-drag: none;
}

.pgr-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0,0,0,0.52);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: background 0.2s, opacity 0.2s;
}
.pgr-prev { left: 0.75rem; }
.pgr-next { right: 0.75rem; }
.pgr-stage:hover .pgr-nav,
.pgr-nav:focus-visible { opacity: 1; }
.pgr-nav:hover { background: rgba(200,56,79,0.8); }
.pgr-nav:disabled { opacity: 0 !important; cursor: default; }
@media (hover: none) { .pgr-nav { opacity: 0.6; width: 48px; height: 48px; font-size: 1.7rem; } }

.pgr-strip {
    flex-shrink: 0;
    height: 66px;
    display: flex;
    gap: 3px;
    padding: 3px 6px;
    overflow-x: auto;
    background: #060609;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.pgr-strip::-webkit-scrollbar { height: 3px; }
.pgr-strip::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
.pgr-thumb {
    flex-shrink: 0;
    width: 42px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    padding: 0;
    transition: border-color 0.1s;
}
.pgr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgr-thumb.active { border-color: var(--accent); }
.pgr-thumb:hover:not(.active) { border-color: rgba(200,56,79,0.45); }

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}
.pagination-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

/* ─── Search ────────────────────────────────────────────────── */
.search-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}
.search-wrap h1 { margin-bottom: 1.5rem; }

.search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.search-input {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.search-results { display: flex; flex-direction: column; gap: 1rem; }

.search-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s;
    color: var(--text);
}
.search-item:hover { border-color: var(--accent); color: var(--text); }
.search-item-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    border: 1px solid var(--accent-muted);
    background: var(--accent-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-item-title { font-family: var(--font-serif); }
.search-no-results { color: var(--text-muted); text-align: center; padding: 2rem 0; }

.search-section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.search-section-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text);
}
.search-section-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }

.btn-danger {
    background: transparent;
    color: #e05555;
    border-color: rgba(224,85,85,0.3);
}
.btn-danger:hover { background: rgba(224,85,85,0.1); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 5rem 1.5rem;
    color: var(--text-muted);
}
.empty-state h2 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--text-muted); }

/* ─── Admin ─────────────────────────────────────────────────── */
body.admin-body {
    background: var(--bg);
    display: block;
}

.admin-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-brand {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.admin-nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}
.admin-nav-links a {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.admin-nav-links a:hover { color: var(--text); }

.admin-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.admin-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: normal;
    font-family: var(--font-sans);
}
.admin-table td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table tr:hover td { background: var(--card); }
.admin-table .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-green { background: rgba(80,200,120,0.15); color: #50c878; }
.badge-gray  { background: rgba(120,120,160,0.15); color: var(--text-muted); }

/* Admin Form */
.admin-form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 720px; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.form-control {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
.form-control:focus { border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-control[type="file"] { cursor: pointer; }
.form-control[type="file"]::file-selector-button {
    background: var(--accent-muted);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    margin-right: 0.75rem;
    font-size: 0.8rem;
}
.form-hint { font-size: 0.75rem; color: var(--text-muted); }
.form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; padding-top: 0.5rem; }

.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.alert-danger  { background: rgba(224,85,85,0.1);  border: 1px solid rgba(224,85,85,0.3);  color: #e08080; }
.alert-success { background: rgba(80,200,120,0.08); border: 1px solid rgba(80,200,120,0.3); color: #50c878; }

/* Admin Login */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.login-box {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
}
.login-box h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.25rem;
}
.login-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

/* Admin page thumbnails */
.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.page-thumb {
    aspect-ratio: 3/4;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.page-thumb-num {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.72);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
}
.page-thumb-del {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(224,85,85,0.88);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.65rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.page-thumb:hover .page-thumb-del,
.page-thumb:focus-within .page-thumb-del { opacity: 1; }
@media (hover: none) { .page-thumb-del { opacity: 1; } }

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.stat-num {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Section heading in admin */
.section-heading {
    font-size: 1rem;
    font-family: var(--font-serif);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-style: italic;
}

/* Admin burger button */
.admin-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.admin-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.25s;
}
.admin-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.admin-burger.open span:nth-child(2) { opacity: 0; }
.admin-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .nav-burger { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(11,11,16,0.97);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1.25rem 2rem;
        gap: 1.25rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 0.9rem; }
    .site-nav { position: relative; }

    .post-grid { grid-template-columns: 1fr; padding: 0 1rem 2rem; }
    .comics-grid { grid-template-columns: repeat(2, 1fr); padding: 0 1rem 2rem; }
    .comics-grid-featured { grid-template-columns: 1fr; }
    .comics-grid-featured .comic-card a { display: block; }
    .comics-grid-featured .comic-info { padding: 0.9rem 1rem 1rem; }
    .comics-grid-featured .comic-info h2 { font-size: 0.95rem; }
    .comic-description { -webkit-line-clamp: 3; }
    .page-header { padding: 2rem 1rem 1rem; }
    .sort-tabs a { min-height: 44px; padding: 0.55rem 0.9rem; }
    .search-form { flex-direction: column; }
    .post-view { padding: 1.5rem 1rem 3rem; }
    .gallery-stage { min-height: 180px; }
    .gallery-btn { width: 34px; height: 34px; font-size: 0.9rem; }
    .gallery-thumb { width: 56px; height: 56px; }
    .pgr-bar { height: 52px; gap: 0.55rem; padding: 0 0.6rem; }
    .pgr-back { font-size: 0.65rem; letter-spacing: 0.08em; }
    .pgr-title { font-size: 0.82rem; }
    .pgr-counter { font-size: 0.68rem; }
    .pgr-info,
    .pgr-fs { width: 44px; height: 44px; }
    .pgr-info-panel { top: 52px; }

    /* Admin mobile */
    .admin-burger { display: flex; }
    .admin-nav { padding: 0 1rem; position: relative; }
    .admin-nav-links {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
        z-index: 100;
    }
    .admin-nav-links.open { display: flex; }
    .admin-nav-links a { font-size: 0.9rem; }
    .admin-wrap { padding: 1.5rem 1rem 3rem; }
    .admin-table { font-size: 0.82rem; }
    .admin-title { font-size: 1.3rem; }
}

@media (max-width: 400px) {
    .comics-grid { grid-template-columns: 1fr; }
}
