/*
Theme Name: Tsukuyomi Gilded Archive
Theme URI: https://tsukuyomi-superiority.com
Author: JoTo
Version: 3.0.0
Description: A dark doujin aggregator theme in a modern card-based visual language — large
rounded cards, soft shadows, pill badges, and a clean sans-serif type system — built on
native Custom Post Types, deep AJAX multi-taxonomy filtering with include/exclude and range
filters, a taxonomy cloud, a guest-friendly community board, a live chatbox, client-side
bookmarks, and a Hiperdex-style paged/webtoon reader.
Text Domain: standalone-manga
*/

/* ==========================================================================
   1. Design Tokens — same palette as before (ink/vellum/gold/wine), rebuilt
      around a flat modern card language: bigger radii, softer shadows, and
      a clean sans-serif type system in place of the old serif/gothic one.
   ========================================================================== */
:root {
    /* Surfaces */
    --ink:            #050402;   /* page background — flat, no texture */
    --ink-2:          #080603;   /* secondary background */
    --vellum:         #1b160f;   /* card / panel surface */
    --vellum-raised:  #251d13;   /* hover / raised surface */
    --vellum-sunken:  #110d07;   /* inset surface (inputs, wells) */

    /* Lines */
    --line:           #3c2f1c;   /* primary borders */
    --line-soft:      #271f14;   /* subtle dividers */
    --line-bright:    #5c4a28;   /* hover borders */

    /* Gold */
    --gold:           #c9a034;   /* primary accent */
    --gold-bright:    #e8c56a;   /* hover / highlight gold */
    --gold-dim:       #7d6527;   /* muted gold, disabled/secondary */
    --gold-ink:       #1a1305;   /* text sitting on top of gold fills */

    /* Wine (secondary accent) */
    --wine:           #7c2230;
    --wine-bright:    #a3323f;
    --wine-text:      #f0c9ce;

    /* Text */
    --parchment:      #ece0c4;   /* primary text */
    --parchment-dim:  #b3a483;   /* secondary / muted text */
    --parchment-faint:#7d7156;   /* tertiary / placeholder text */

    /* Feedback */
    --ok:             #6e9b5a;
    --danger:         #a3323f;

    /* Type — clean modern sans-serif system */
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --font-body:    'Inter', -apple-system, sans-serif;
    --font-ui:      'Inter', -apple-system, sans-serif;

    /* Elevation — soft diffuse shadows instead of hard borders */
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.45);
    --shadow-pop:  0 20px 48px rgba(0, 0, 0, 0.55);
    --glow-gold:   0 0 0 1px rgba(201, 160, 52, 0.3);

    /* Radius scale */
    --radius: 10px;        /* buttons, inputs, small controls */
    --radius-lg: 20px;      /* cards, panels, hero, modals */
    --radius-md: 14px;      /* medium cards (list rows, thumbnails) */
    --radius-pill: 999px;   /* badges, pills, segmented tabs */
}

/* ==========================================================================
   2. Base & Global Dark Mode
   ========================================================================== */
* { box-sizing: border-box; }

body {
    background-color: var(--ink);
    background-image: radial-gradient(ellipse at top, rgba(201, 160, 52, 0.035), transparent 60%);
    background-attachment: fixed;
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    color: var(--parchment);
    font-weight: 700;
}

::selection { background: var(--gold); color: var(--gold-ink); }

:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Custom Webkit Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 999px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ==========================================================================
   3. Typography & Layout Utilities
   ========================================================================== */
.tsuku-eyebrow {
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-dim);
}

.tsuku-section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--parchment);
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1.1rem;
}
.tsuku-section-title .tsuku-fleuron { display: none; } /* decorative glyph retired in favor of clean bold headings */

/* .tsuku-dropcap and .tsuku-frame are retired visual flourishes from the previous
   ornamental design — kept as harmless no-op selectors so no template markup needs to change. */
.tsuku-dropcap:first-letter { font: inherit; float: none; }
.tsuku-frame::before, .tsuku-frame::after { content: none; }

/* ==========================================================================
   4. Navigation / Header
   ========================================================================== */
.tsuku-navbar {
    background: var(--ink-2);
    border-bottom: 1px solid var(--line-soft);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.tsuku-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--parchment) !important;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.tsuku-brand .tsuku-brand-mark { display: inline-flex; align-items: center; justify-content: center; }
.tsuku-crest { display: block; }

.tsuku-navbar .nav-link {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--parchment-dim) !important;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-pill);
    transition: color 0.15s ease, background 0.15s ease;
}
.tsuku-navbar .nav-link:hover,
.tsuku-navbar .nav-link.active {
    color: var(--parchment) !important;
    background: var(--vellum-raised);
}

.tsuku-search-form { position: relative; }
.tsuku-search-form input {
    background: var(--vellum) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-pill) !important;
    color: var(--parchment) !important;
    font-family: var(--font-ui);
    padding-left: 1.1rem !important;
}
.tsuku-search-form input::placeholder { color: var(--parchment-faint); }
.tsuku-search-form input:focus {
    border-color: var(--gold-dim) !important;
    box-shadow: 0 0 0 3px rgba(201, 160, 52, 0.15) !important;
}
.tsuku-search-form button.btn { border-radius: var(--radius-pill); }

.tsuku-search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--vellum-raised);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    border-radius: var(--radius-lg);
    z-index: 1050;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.4rem;
    display: none;
}
.tsuku-search-suggest.is-open { display: block; }
.tsuku-search-suggest a.tsuku-suggest-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    text-decoration: none;
    color: var(--parchment);
    border-radius: var(--radius);
}
.tsuku-search-suggest a.tsuku-suggest-row:hover { background: var(--vellum); color: var(--gold-bright); }
.tsuku-suggest-row img { width: 34px; height: 44px; object-fit: cover; border-radius: 8px; }
.tsuku-suggest-row .tsuku-suggest-meta { font-size: 0.72rem; color: var(--parchment-faint); font-family: var(--font-ui); }
.tsuku-search-suggest .tsuku-suggest-empty { padding: 0.75rem; font-size: 0.85rem; color: var(--parchment-faint); font-family: var(--font-ui); }

/* ==========================================================================
   5. Buttons & Form Controls
   ========================================================================== */
.btn {
    border-radius: var(--radius-pill) !important;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 1.2rem;
    border: none;
}

.btn-gold {
    background: var(--gold);
    color: var(--gold-ink);
}
.btn-gold:hover { background: var(--gold-bright); color: var(--gold-ink); }

.btn-outline-gold {
    background: var(--vellum-raised);
    border: 1px solid var(--line) !important;
    color: var(--parchment);
}
.btn-outline-gold:hover { background: var(--vellum); border-color: var(--gold-dim) !important; color: var(--gold-bright); }

.btn-wine {
    background: var(--wine);
    color: var(--wine-text);
}
.btn-wine:hover { background: var(--wine-bright); color: var(--wine-text); }

.form-control, .form-select, textarea {
    font-family: var(--font-ui);
    border-radius: var(--radius) !important;
}
.form-control.bg-dark, .form-select.bg-dark {
    background-color: var(--vellum) !important;
    border-color: var(--line) !important;
    color: var(--parchment) !important;
}
.form-control.bg-dark:focus, .form-select.bg-dark:focus {
    border-color: var(--gold-dim) !important;
    box-shadow: 0 0 0 3px rgba(201, 160, 52, 0.15) !important;
}

/* ==========================================================================
   6. Manga Cards — Grid & List variants
   ========================================================================== */
.manga-card {
    background-color: var(--vellum) !important;
    border: 1px solid var(--line-soft) !important;
    border-radius: var(--radius-lg) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}
.manga-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.manga-card img { object-fit: cover; width: 100%; }
.manga-card .card-img-top { border-radius: 0 !important; }

.manga-card .card-body { background: var(--vellum); padding: 0.85rem !important; }
.manga-card .card-title a { color: var(--parchment); font-family: var(--font-heading); font-weight: 700; font-size: 0.92rem; }
.manga-card .card-title a:hover { color: var(--gold-bright); }
.manga-card small.text-muted { color: var(--parchment-faint) !important; font-family: var(--font-ui); }

.tsuku-card-badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; gap: 4px; flex-wrap: wrap;
    z-index: 3;
}
.tsuku-card-badges .badge-taxonomy { font-size: 0.62rem; }

.tsuku-card-stats {
    display: flex; gap: 0.7rem;
    font-size: 0.74rem;
    color: var(--parchment-faint);
    font-family: var(--font-ui);
    margin-top: 4px;
}
.tsuku-card-stats span { display: inline-flex; align-items: center; gap: 0.3em; }

/* List variant (rendered by template-parts/content-manga-card.php when view mode starts with "list") */
.manga-card--list {
    flex-direction: row;
    align-items: stretch;
}
.manga-card--list .tsuku-list-thumb {
    width: 100px;
    min-width: 100px;
    height: 130px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.manga-card--list .tsuku-list-thumb img { width: 100%; height: 100%; }
.manga-card--list .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem !important;
}
.manga-card--list .card-title a { font-size: 1.05rem; }
.manga-card--list .tsuku-list-excerpt {
    font-size: 0.85rem;
    color: var(--parchment-dim);
    font-family: var(--font-body);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   7. Badges & Pills
   ========================================================================== */
.badge {
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    padding: 0.32em 0.75em !important;
}

.badge-taxonomy {
    background-color: var(--vellum-raised);
    color: var(--parchment-dim);
    border: none;
    font-family: var(--font-ui);
    font-size: 0.72rem;
}
a.badge-taxonomy:hover, .badge-taxonomy:hover { color: var(--gold-bright); text-decoration: none; }

.badge-gold { background: var(--gold); color: var(--gold-ink); font-family: var(--font-ui); }
.badge-wine { background: var(--wine); color: var(--wine-text); font-family: var(--font-ui); }

/* ==========================================================================
   8. Advanced Filter Sidebar — a vertical stack of per-taxonomy dropdown
      triggers (autocomplete search + A-Z jump + include/exclude cycling
      inside each), living in a persistent left sidebar
   ========================================================================== */
.tsuku-filter-sidebar {
    background: var(--vellum);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 84px;
}
.tsuku-filter-sidebar-inner { padding: 1.3rem; }

.tsuku-sidebar-section {
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--line-soft);
}
.tsuku-sidebar-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.tsuku-sidebar-heading-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.tsuku-sidebar-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--parchment);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4em;
}
.tsuku-sidebar-reset-all {
    width: 100%;
    text-align: center;
    background: var(--vellum-raised);
    border: 1px solid var(--line);
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-pill);
    padding: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.tsuku-sidebar-reset-all:hover { background: var(--wine); border-color: var(--wine); color: var(--wine-text); }

/* Per-taxonomy dropdown list — a stacked column of full-width trigger buttons (pill style) */
.tsuku-tax-list { display: flex; flex-direction: column; gap: 6px; }
.tsuku-tax-list .dropdown { width: 100%; }

.tsuku-tax-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--vellum-sunken);
    border: 1px solid var(--line);
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-pill);
    text-align: left;
}
.tsuku-tax-trigger:hover, .tsuku-tax-trigger.show { background: var(--vellum-raised); color: var(--parchment); }
.tsuku-tax-trigger .tsuku-tax-active-count {
    background: var(--gold);
    color: var(--gold-ink);
    border-radius: 50%;
    font-size: 0.65rem;
    min-width: 17px; height: 17px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: 0.4em;
}

.tsuku-tax-menu {
    background: var(--vellum-raised) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-pop);
    width: 280px;
    max-width: 88vw;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.7rem !important;
}
.tsuku-tax-menu .tsuku-tax-hint {
    font-size: 0.68rem;
    color: var(--parchment-faint);
    font-family: var(--font-ui);
    padding: 0.15rem 0.15rem 0.5rem;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 0.4rem;
}
.tsuku-tax-menu-footer { border-top: 1px solid var(--line-soft); margin-top: 0.4rem; padding-top: 0.4rem; text-align: right; }
.tsuku-tax-reset {
    background: none; border: none; color: var(--parchment-faint);
    font-family: var(--font-ui); font-size: 0.7rem;
    cursor: pointer; padding: 0;
}
.tsuku-tax-reset:hover { color: var(--wine-bright); }

/* Sort — a plain <select>, styled by the shared .form-select.bg-dark rule above */

/* Per-taxonomy search (inside the dropdown menu) */
.tsuku-tax-search-row { margin-bottom: 0.5rem; }
.tsuku-tax-search-row input {
    width: 100%;
    background: var(--vellum-sunken);
    border: 1px solid var(--line);
    color: var(--parchment);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-pill);
}
.tsuku-tax-search-row input:focus { outline: none; border-color: var(--gold-dim); }
.tsuku-tax-search-row input::placeholder { color: var(--parchment-faint); }

.tsuku-tax-az-row { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 0.5rem; }
.tsuku-tax-az-btn {
    min-width: 19px; height: 19px;
    font-size: 0.6rem;
    background: transparent;
    border: none;
    color: var(--parchment-faint);
    border-radius: 5px;
    cursor: pointer;
    line-height: 1;
}
.tsuku-tax-az-btn:hover { background: var(--vellum-sunken); color: var(--gold-bright); }
.tsuku-tax-az-btn:disabled { opacity: 0.25; cursor: default; }
.tsuku-tax-az-btn:disabled:hover { background: none; color: var(--parchment-faint); }

.tsuku-tax-terms-wrap { display: flex; flex-direction: column; gap: 2px; }
.tsuku-tax-no-match { font-size: 0.76rem; color: var(--parchment-faint); font-family: var(--font-ui); padding: 0.3rem 0; display: none; }
.tsuku-tax-no-match.is-visible { display: block; }

/* Term rows — three-state (neutral -> include -> exclude -> neutral), pill style */
.tsuku-term-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: var(--radius-pill);
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.tsuku-term-chip:hover { background: var(--vellum-sunken); color: var(--parchment); }
.tsuku-term-chip .tsuku-chip-count { font-size: 0.7rem; color: var(--parchment-faint); }
.tsuku-term-chip .tsuku-chip-state-icon {
    width: 15px; height: 15px;
    border: 1px solid var(--line-bright);
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
    line-height: 1;
}
.tsuku-term-chip[data-state="include"] { background: rgba(201, 160, 52, 0.16); color: var(--gold-bright); }
.tsuku-term-chip[data-state="include"] .tsuku-chip-state-icon { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.tsuku-term-chip[data-state="include"] .tsuku-chip-state-icon::before { content: '\2713'; }
.tsuku-term-chip[data-state="exclude"] { background: rgba(124, 34, 48, 0.2); color: var(--wine-text); }
.tsuku-term-chip[data-state="exclude"] .tsuku-chip-state-icon { background: var(--wine); border-color: var(--wine); color: var(--wine-text); }
.tsuku-term-chip[data-state="exclude"] .tsuku-chip-state-icon::before { content: '\2715'; }
.tsuku-term-chip.tsuku-tax-hidden { display: none; }

/* Year & Language — the two taxonomies that are plain multi-checkbox, not cycling */
.tsuku-year-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--parchment-dim);
}
.tsuku-year-check:hover { background: var(--vellum-sunken); color: var(--parchment); }
.tsuku-year-check input[type="checkbox"] { accent-color: var(--gold); width: 15px; height: 15px; }
.tsuku-year-check .tsuku-chip-count { font-size: 0.7rem; color: var(--parchment-faint); margin-left: auto; }
.tsuku-year-check.tsuku-tax-hidden { display: none; }

/* Range filters (page count / chapter "height") */
.tsuku-range-group { display: flex; align-items: center; gap: 0.4rem; }
.tsuku-range-group input[type="number"] {
    width: 5rem;
    background: var(--vellum-sunken);
    border: 1px solid var(--line);
    color: var(--parchment);
    font-family: var(--font-ui);
    border-radius: var(--radius);
    padding: 0.4rem 0.55rem;
}
.tsuku-range-group span { color: var(--parchment-faint); font-family: var(--font-ui); font-size: 0.78rem; }

/* Ratings section — minimum-rating star selector */
.tsuku-rating-filter { display: flex; align-items: center; gap: 4px; }
.tsuku-rating-star-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--line-bright);
    padding: 0;
}
.tsuku-rating-star-btn.is-filled { color: var(--gold); }
.tsuku-rating-star-btn:hover { color: var(--gold-bright); }
.tsuku-rating-filter-label { font-family: var(--font-ui); font-size: 0.72rem; color: var(--parchment-faint); margin-left: 0.3rem; }

/* Static rating display (manga card, single manga page) */
.tsuku-rating-display { display: inline-flex; align-items: center; gap: 2px; }
.tsuku-rating-display .tsuku-star { color: var(--line-bright); font-size: 0.85em; }
.tsuku-rating-display .tsuku-star.is-filled { color: var(--gold); }
.tsuku-rating-display .tsuku-star.is-half { color: var(--gold-dim); }

/* Interactive rating widget (single manga page) */
.tsuku-rate-widget { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tsuku-rate-stars { display: inline-flex; gap: 2px; }
.tsuku-rate-star-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1.6rem; line-height: 1;
    color: var(--line-bright);
    transition: color 0.1s ease, transform 0.1s ease;
}
.tsuku-rate-star-btn:hover, .tsuku-rate-star-btn.is-preview { color: var(--gold-bright); transform: scale(1.1); }
.tsuku-rate-star-btn.is-filled { color: var(--gold); }
.tsuku-rate-widget.is-locked .tsuku-rate-star-btn { cursor: default; }
.tsuku-rate-widget.is-locked .tsuku-rate-star-btn:hover { transform: none; }
.tsuku-rate-summary { font-family: var(--font-ui); font-size: 0.85rem; color: var(--parchment-dim); }
.tsuku-rate-msg { font-family: var(--font-ui); font-size: 0.76rem; color: var(--gold-dim); }

/* A-Z title index — lives above the results grid in the main content area */
.tsuku-az-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.tsuku-az-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    background: var(--vellum);
    border: 1px solid var(--line-soft);
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.78rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.12s ease;
}
.tsuku-az-btn:hover { background: var(--vellum-raised); color: var(--gold-bright); }
.tsuku-az-btn.is-active { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 700; }

/* View switcher: grid-4 / grid-8 / list-1 / list-2 — segmented pill group */
.tsuku-view-switch { display: inline-flex; background: var(--vellum-sunken); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.tsuku-view-btn {
    width: 34px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    color: var(--parchment-faint);
}
.tsuku-view-btn:hover { color: var(--gold-bright); }
.tsuku-view-btn.is-active { background: var(--gold); color: var(--gold-ink); }
.tsuku-view-icon { display: grid; gap: 2px; }
.tsuku-view-icon span { background: currentColor; display: block; }
.tsuku-view-icon.i-grid4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); width: 13px; height: 13px; }
.tsuku-view-icon.i-grid4 span { border-radius: 1px; }
.tsuku-view-icon.i-grid8 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); width: 15px; height: 11px; }
.tsuku-view-icon.i-grid8 span { border-radius: 1px; }
.tsuku-view-icon.i-list1 { grid-template-rows: repeat(3, 1fr); width: 16px; height: 13px; }
.tsuku-view-icon.i-list1 span { height: 3px; border-radius: 1px; }
.tsuku-view-icon.i-list2 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); width: 16px; height: 13px; }
.tsuku-view-icon.i-list2 span { border-radius: 1px; }

/* Active filter chips (shown in main content top bar) */
.tsuku-active-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tsuku-active-chip {
    display: inline-flex; align-items: center; gap: 0.4em;
    background: var(--vellum-raised);
    border: none;
    color: var(--parchment);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
}
.tsuku-active-chip.is-exclude { background: rgba(124,34,48,0.2); color: var(--wine-text); }
.tsuku-active-chip.is-include { background: rgba(201,160,52,0.16); color: var(--gold-bright); }
.tsuku-active-chip button { background: none; border: none; color: inherit; opacity: 0.7; cursor: pointer; line-height: 1; padding: 0; }
.tsuku-active-chip button:hover { opacity: 1; }

/* Mobile off-canvas filter panel */
.tsuku-filter-toggle-mobile { display: none; }
@media (max-width: 991.98px) {
    .tsuku-filter-toggle-mobile { display: inline-flex; }
    .tsuku-filter-sidebar {
        position: fixed;
        top: 0; left: -320px;
        width: 300px;
        height: 100%;
        max-height: 100%;
        overflow-y: auto;
        border-radius: 0;
        z-index: 1250;
        transition: left 0.22s ease;
        box-shadow: var(--shadow-pop);
    }
    .tsuku-filter-sidebar.is-open { left: 0; }
    .tsuku-filter-sidebar-backdrop {
        display: none;
        position: fixed; inset: 0;
        background: rgba(5,4,2,0.7);
        z-index: 1240;
    }
    .tsuku-filter-sidebar-backdrop.is-open { display: block; }
    .tsuku-sidebar-close-mobile { display: block !important; }
}
.tsuku-sidebar-close-mobile {
    display: none;
    width: 100%;
    background: var(--vellum-raised);
    border: none;
    color: var(--parchment);
    font-family: var(--font-ui);
    font-weight: 600;
    padding: 0.6rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
    cursor: pointer;
}

/* ==========================================================================
   9. Pagination & Empty States
   ========================================================================== */
.tsuku-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 1.75rem; }
.tsuku-page-btn {
    min-width: 36px; height: 36px; padding: 0 10px;
    background: var(--vellum);
    border: none;
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-weight: 500;
    border-radius: var(--radius-pill);
    cursor: pointer;
}
.tsuku-page-btn:hover { background: var(--vellum-raised); color: var(--gold-bright); }
.tsuku-page-btn.is-active { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.tsuku-page-ellipsis { color: var(--parchment-faint); align-self: center; padding: 0 4px; }

.tsuku-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--parchment-dim);
    font-family: var(--font-ui);
}
.tsuku-empty-glyph { display: block; font-size: 2rem; color: var(--gold-dim); margin-bottom: 0.5rem; }

/* ==========================================================================
   10. Single Manga Page
   ========================================================================== */
.tsuku-poster-frame { background: var(--vellum); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.tsuku-poster-frame img { display: block; }

.tsuku-bookmark-seal {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--vellum-raised);
    border: none;
    color: var(--parchment-dim);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}
.tsuku-bookmark-seal:hover { transform: scale(1.06); color: var(--gold-bright); }
.tsuku-bookmark-seal.is-bookmarked { background: var(--gold); color: var(--gold-ink); }
.tsuku-bookmark-label { font-family: var(--font-ui); font-size: 0.76rem; color: var(--parchment-faint); margin-top: 5px; text-align: center; }

.tsuku-dl-box { background: var(--vellum); border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.tsuku-dl-box a.tsuku-dl-link {
    color: var(--parchment);
    font-family: var(--font-ui);
    font-weight: 500;
    display: flex; align-items: center; gap: 0.5em;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line-soft);
}
.tsuku-dl-box a.tsuku-dl-link:last-child { border-bottom: none; }
.tsuku-dl-box a.tsuku-dl-link:hover { color: var(--gold-bright); }
.tsuku-dl-box a.tsuku-dl-link::before { content: '\2726'; color: var(--gold-dim); font-size: 0.8em; }

.table-dark { --bs-table-bg: transparent; --bs-table-accent-bg: transparent; }
.table-dark th { color: var(--parchment-faint) !important; font-weight: 600; font-family: var(--font-ui); font-size: 0.85rem; }
.table-dark td { font-family: var(--font-ui); font-size: 0.88rem; }
.table-dark td a { color: var(--parchment-dim); text-decoration: none; }
.table-dark td a:hover { color: var(--gold-bright); text-decoration: none; }

.list-group-item-action { transition: background-color 0.15s ease; font-family: var(--font-ui); border-radius: var(--radius) !important; }
.list-group-item-action:hover { background-color: var(--vellum-raised) !important; }
.list-group-item.bg-dark { background: var(--vellum) !important; border: none !important; margin-bottom: 4px; border-radius: var(--radius) !important; }

/* ==========================================================================
   11. Taxonomy Cloud Page — Tags get their own flagship panel; the other
       13 taxonomies sit in a separate multi-column grid below. Terms are
       styled as badge/chip pills, matching the badge-taxonomy /
       tsuku-term-chip treatment used everywhere else in the theme.
   ========================================================================== */
.tsuku-cloud-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }

.tsuku-cloud-sort { display: inline-flex; background: var(--vellum-sunken); border-radius: var(--radius-pill); padding: 3px; gap: 2px; flex-shrink: 0; }
.tsuku-cloud-sort-btn {
    background: transparent;
    border: none;
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.78rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
}
.tsuku-cloud-sort-btn:hover { color: var(--gold-bright); }
.tsuku-cloud-sort-btn.is-active { background: var(--gold); color: var(--gold-ink); font-weight: 700; }

.tsuku-cloud-group-title {
    font-family: var(--font-heading);
    color: var(--parchment);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 2rem 0 1rem;
}
.tsuku-cloud-group-title:first-of-type { margin-top: 0; }

/* Tags — the flagship panel, one wide un-capped cloud, warmer badge tone */
.tsuku-cloud-tags-panel {
    background: var(--vellum);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 0.5rem;
}
.tsuku-cloud-tags-panel .tsuku-cloud-wrap {
    max-height: none;
    overflow: visible;
    padding: 0;
}
.tsuku-cloud-tags-panel .tsuku-cloud-wrap::after { display: none; }

.tsuku-cloud-term--tag {
    background: rgba(201, 160, 52, 0.12);
    color: var(--gold-bright);
}
.tsuku-cloud-term--tag:hover { background: rgba(201, 160, 52, 0.22); }
.tsuku-cloud-term--tag.is-selected { background: var(--gold); color: var(--gold-ink); }

/* Taxonomies — the reference-metadata grid (everything except Tags) */
.tsuku-cloud-grid { column-count: 1; column-gap: 1rem; }
@media (min-width: 768px)  { .tsuku-cloud-grid { column-count: 2; } }
@media (min-width: 1200px) { .tsuku-cloud-grid { column-count: 3; } }

.tsuku-cloud-section {
    break-inside: avoid;
    margin-bottom: 1rem;
    background: var(--vellum);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.tsuku-cloud-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
}
.tsuku-cloud-section-head h2 {
    font-family: var(--font-heading);
    color: var(--parchment);
    font-weight: 700;
    margin: 0;
    font-size: 0.85rem;
}
.tsuku-cloud-section-count { font-family: var(--font-ui); font-size: 0.68rem; color: var(--parchment-faint); flex-shrink: 0; }

.tsuku-cloud-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    padding: 0 1rem 1rem;
    align-items: flex-start;
    max-height: 210px;
    overflow: hidden;
    position: relative;
}
.tsuku-cloud-wrap.is-expanded { max-height: none; }
.tsuku-cloud-wrap:not(.is-expanded)::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
    background: linear-gradient(0deg, var(--vellum), transparent);
    pointer-events: none;
}
.tsuku-cloud-expand-btn {
    display: block;
    width: 100%;
    background: var(--vellum-sunken);
    border: none;
    color: var(--gold-dim);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.55rem;
    cursor: pointer;
}
.tsuku-cloud-expand-btn:hover { color: var(--gold-bright); }

/* Term pill — badge-style, matching .badge-taxonomy / .tsuku-term-chip elsewhere in the theme */
.tsuku-cloud-term {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--font-ui);
    font-weight: 500;
    color: var(--parchment-dim);
    background: var(--vellum-raised);
    border: none;
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    transition: color 0.15s ease, background 0.15s ease;
    line-height: 1.4;
    cursor: pointer;
}
.tsuku-cloud-term:hover { color: var(--gold-bright); background: var(--vellum-sunken); }
.tsuku-cloud-term.is-selected { background: var(--gold); color: var(--gold-ink); }
.tsuku-cloud-term .tsuku-cloud-count { font-family: var(--font-ui); font-size: 0.72em; opacity: 0.75; margin-left: 0.35em; }

.tsuku-cloud-selection-bar {
    position: sticky;
    bottom: 16px;
    margin-top: 1.5rem;
    background: var(--vellum-raised);
    border: none;
    box-shadow: var(--shadow-pop);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.1rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tsuku-cloud-selection-bar.is-visible { display: flex; }
.tsuku-cloud-selection-bar .tsuku-selection-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.tsuku-cloud-selection-bar .tsuku-active-chip { font-size: 0.72rem; }

/* ==========================================================================
   12. Community Board
   ========================================================================== */
.tsuku-panel { background: var(--vellum); border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.tsuku-panel-title { font-family: var(--font-heading); color: var(--parchment); font-weight: 700; font-size: 0.85rem; padding: 1.1rem 1.1rem 0; }

.tsuku-topic-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line-soft);
    text-decoration: none;
    color: var(--parchment);
}
.tsuku-topic-row:last-child { border-bottom: none; }
.tsuku-topic-row:hover { background: var(--vellum-raised); }
.tsuku-topic-row:first-child { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
.tsuku-topic-row:last-child { border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.tsuku-topic-row .tsuku-topic-pin { color: var(--gold); flex-shrink: 0; }
.tsuku-topic-row .tsuku-topic-title { font-family: var(--font-heading); font-weight: 700; color: var(--parchment); }
.tsuku-topic-row:hover .tsuku-topic-title { color: var(--gold-bright); }
.tsuku-topic-row .tsuku-topic-meta { font-size: 0.78rem; color: var(--parchment-faint); font-family: var(--font-ui); }
.tsuku-topic-row .tsuku-topic-stats { margin-left: auto; text-align: right; font-family: var(--font-ui); font-size: 0.8rem; color: var(--parchment-dim); flex-shrink: 0; }

.tsuku-category-pill {
    display: inline-block;
    background: var(--vellum-raised);
    border: none;
    color: var(--gold-bright);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
}
.tsuku-category-pill:hover { background: var(--vellum-sunken); color: var(--gold-bright); }

.tsuku-composer-backdrop {
    position: fixed; inset: 0;
    background: rgba(5, 4, 2, 0.72);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.tsuku-composer-backdrop.is-open { display: flex; }
.tsuku-composer {
    background: var(--vellum);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.75rem;
    position: relative;
}
.tsuku-composer h4 { font-family: var(--font-heading); color: var(--parchment); font-weight: 700; margin-bottom: 1.1rem; }
.tsuku-composer label { font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; color: var(--parchment-dim); margin-bottom: 0.35rem; display: block; }
.tsuku-composer .tsuku-website-trap { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.tsuku-composer-close { position: absolute; top: 0.9rem; right: 1rem; background: var(--vellum-raised); border: none; border-radius: 50%; width: 28px; height: 28px; color: var(--parchment-faint); font-size: 1.1rem; cursor: pointer; }
.tsuku-composer-close:hover { color: var(--gold-bright); }
.tsuku-composer-msg { font-family: var(--font-ui); font-size: 0.85rem; margin-top: 0.75rem; min-height: 1.2em; }
.tsuku-composer-msg.is-error { color: var(--danger); }
.tsuku-composer-msg.is-ok { color: var(--ok); }

/* ==========================================================================
   13. Live Chat Widget — inline panel (homepage only, not floating)
   ========================================================================== */
.tsuku-chat-panel {
    background: var(--vellum);
    border: none;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.tsuku-chat-head {
    padding: 0.9rem 1.1rem 0.6rem;
    display: flex; align-items: center; justify-content: space-between;
}
.tsuku-chat-head h6 { font-family: var(--font-heading); color: var(--parchment); font-weight: 700; margin: 0; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4em; }
.tsuku-chat-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 6px rgba(110,155,90,0.7); }
.tsuku-chat-head small { color: var(--parchment-faint); font-family: var(--font-ui); font-size: 0.68rem; }

.tsuku-chat-log {
    height: 320px;
    overflow-y: auto;
    padding: 0.7rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.tsuku-chat-msg { font-family: var(--font-ui); font-size: 0.82rem; line-height: 1.5; }
.tsuku-chat-msg .tsuku-chat-name { color: var(--gold-bright); font-weight: 600; margin-right: 0.4em; }
.tsuku-chat-msg .tsuku-chat-time { color: var(--parchment-faint); font-size: 0.68rem; margin-left: 0.4em; }
.tsuku-chat-msg .tsuku-chat-text { color: var(--parchment); word-break: break-word; }
.tsuku-chat-empty { color: var(--parchment-faint); font-family: var(--font-ui); font-size: 0.8rem; text-align: center; margin-top: 1rem; }

/* Rich-text elements produced by the server-side chat markup parser */
.tsuku-chat-u { text-decoration: underline; text-decoration-color: var(--gold-dim); }
.tsuku-chat-mention { color: var(--gold-bright); background: rgba(201,160,52,0.14); padding: 0 0.4em; border-radius: var(--radius-pill); font-weight: 600; }
.tsuku-chat-img { display: block; max-width: 100%; max-height: 220px; border-radius: var(--radius-md); margin-top: 0.3em; cursor: zoom-in; }
.tsuku-chat-text a { color: var(--gold-bright); text-decoration: underline; }
.tsuku-spoiler {
    background: var(--parchment-faint);
    color: var(--parchment-faint);
    border-radius: 5px;
    padding: 0 0.35em;
    cursor: pointer;
    transition: color 0.1s ease;
}
.tsuku-spoiler:hover, .tsuku-spoiler:focus, .tsuku-spoiler.is-revealed { background: var(--vellum-sunken); color: var(--parchment); }

/* Formatting toolbar */
.tsuku-chat-toolbar {
    display: flex;
    gap: 4px;
    padding: 0.4rem 1.1rem 0;
    flex-wrap: wrap;
}
.tsuku-chat-tool-btn {
    background: var(--vellum-sunken);
    border: none;
    color: var(--parchment-dim);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    width: 26px; height: 24px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
}
.tsuku-chat-tool-btn:hover { background: var(--vellum-raised); color: var(--gold-bright); }
.tsuku-chat-tool-btn[data-tag="b"] { font-weight: 700; }
.tsuku-chat-tool-btn[data-tag="i"] { font-style: italic; }
.tsuku-chat-tool-btn[data-tag="u"] { text-decoration: underline; }
.tsuku-chat-tool-btn[data-tag="s"] { text-decoration: line-through; }

.tsuku-chat-form-wrap { position: relative; }
.tsuku-chat-form {
    padding: 0.6rem 1.1rem 1.1rem;
    display: flex;
    gap: 0.5rem;
}
.tsuku-chat-form input[type="text"] {
    flex: 1;
    background: var(--vellum-sunken);
    border: 1px solid var(--line);
    color: var(--parchment);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-pill);
}
.tsuku-chat-form input[type="text"]:focus { outline: none; border-color: var(--gold-dim); }
.tsuku-chat-form button {
    background: var(--gold);
    border: none;
    color: var(--gold-ink);
    font-family: var(--font-ui);
    font-weight: 600;
    padding: 0 1.1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
}
.tsuku-chat-name-row {
    padding: 0.5rem 1.1rem 0;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--parchment-faint);
    display: flex; align-items: center; gap: 0.4rem;
}
.tsuku-chat-name-row input {
    background: var(--vellum-sunken);
    border: 1px solid var(--line);
    color: var(--parchment);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    width: 130px;
}

/* @mention autocomplete */
.tsuku-mention-suggest {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 1.1rem;
    background: var(--vellum-raised);
    border: none;
    box-shadow: var(--shadow-pop);
    border-radius: var(--radius);
    min-width: 160px;
    max-height: 160px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}
.tsuku-mention-suggest.is-open { display: block; }
.tsuku-mention-suggest button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--parchment);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
}
.tsuku-mention-suggest button:hover { background: var(--vellum); color: var(--gold-bright); }

/* ==========================================================================
   14. Footer
   ========================================================================== */
footer.tsuku-footer {
    background: var(--ink-2);
    border-top: 1px solid var(--line-soft);
}
footer.tsuku-footer .tsuku-footer-mark { color: var(--parchment-dim); font-family: var(--font-heading); font-weight: 700; }

/* ==========================================================================
   15b. Homepage Hero, Spotlight & Accents
   ========================================================================== */
.tsuku-hero {
    position: relative;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    background: var(--vellum);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    text-align: center;
}
.tsuku-hero-crest-bg { display: none; } /* the reference banner is photographic, not a watermark motif */
.tsuku-hero-inner { position: relative; z-index: 2; }
.tsuku-hero-eyebrow {
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-dim);
    margin-bottom: 0.6rem;
}
.tsuku-hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    color: var(--parchment);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    line-height: 1.15;
}
.tsuku-hero-tagline {
    font-family: var(--font-body);
    font-style: normal;
    color: var(--parchment-dim);
    font-size: 1.02rem;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}
.tsuku-hero-rule { display: none; } /* clean modern layout relies on spacing, not decorative rules */
.tsuku-hero-stats { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.tsuku-hero-stat {
    text-align: center;
    background: var(--vellum-sunken);
    border-radius: var(--radius-lg);
    padding: 0.8rem 1.5rem;
}
.tsuku-hero-stat-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--gold-bright); display: block; line-height: 1; }
.tsuku-hero-stat-label { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--parchment-faint); }
.tsuku-hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Featured spotlight — full-width backdrop banner for one highlighted manga (the closest
   analog here to the reference's big hero banner card) */
.tsuku-spotlight {
    position: relative;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 2rem;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}
.tsuku-spotlight-backdrop {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 20%;
    filter: brightness(0.5) saturate(0.95);
}
.tsuku-spotlight-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(5,4,2,0.9) 15%, rgba(5,4,2,0.45) 55%, rgba(5,4,2,0.05) 100%);
}
.tsuku-spotlight-content {
    position: relative; z-index: 2;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    width: 100%;
    flex-wrap: wrap;
}
.tsuku-spotlight-cover {
    width: 120px; min-width: 120px; height: 168px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
}
.tsuku-spotlight-body { flex: 1; min-width: 220px; }
.tsuku-spotlight-eyebrow { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; font-weight: 600; color: var(--gold); margin-bottom: 0.5rem; }
.tsuku-spotlight-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.75rem; color: var(--parchment); margin-bottom: 0.5rem; line-height: 1.15; letter-spacing: -0.01em; }
.tsuku-spotlight-excerpt {
    color: var(--parchment-dim); font-size: 0.92rem; max-width: 640px; margin-bottom: 0.85rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tsuku-spotlight-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* Popular-series ranking medallion */
.tsuku-rank-badge {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--gold);
    color: var(--gold-ink);
    font-family: var(--font-heading); font-weight: 800; font-size: 0.76rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* "New" ribbon for very recent chapters */
.tsuku-new-ribbon {
    background: var(--wine); color: var(--wine-text);
    font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem; border-radius: var(--radius-pill);
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* Random pick sidebar widget */
.tsuku-random-widget { padding: 1.1rem; }
.tsuku-random-widget p { font-size: 0.82rem; color: var(--parchment-dim); }

@media (max-width: 767.98px) {
    .tsuku-hero { padding: 2.25rem 1.25rem; }
    .tsuku-spotlight-content { padding: 1.25rem; }
    .tsuku-spotlight-cover { width: 84px; min-width: 84px; height: 118px; }
    .tsuku-spotlight-title { font-size: 1.3rem; }
}

/* ==========================================================================
   15. Utilities & Responsive
   ========================================================================== */
.tsuku-text-gold { color: var(--gold-bright) !important; }
.tsuku-text-muted { color: var(--parchment-faint) !important; }
.tsuku-hidden { display: none !important; }

@media (max-width: 767.98px) {
    .manga-card--list .tsuku-list-thumb { width: 76px; min-width: 76px; height: 100px; }
}
