/* Brandpowder — Modern Editorial & Social Edition (Minimalist Colossal UI) */
:root {
    --bg: #ffffff;
    --bg-alt: #f5f4f0;
    --bg-elevated: #ffffff;
    --text: #121212;
    --text-muted: #66635e;
    --text-light: #94918a;
    --border: #e6e4df;
    --accent: #e60012;
    --accent-hover: #b8000e;
    --header-bg: rgba(255, 255, 255, 0.94);
    --card-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --font-serif: 'Newsreader', 'Playfair Display', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-w: 1340px;
}

[data-theme="dark"] {
    --bg: #0d0d0e;
    --bg-alt: #161618;
    --bg-elevated: #1b1b1e;
    --text: #f3f2ee;
    --text-muted: #a09d96;
    --text-light: #6e6c66;
    --border: #26262a;
    --accent: #ff2a39;
    --accent-hover: #ff4d59;
    --header-bg: rgba(13, 13, 14, 0.94);
    --card-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    transition: background-color 0.22s ease, color 0.22s ease;
}

@media (max-width: 900px) {
    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

img, iframe, video, svg {
    max-width: 100%;
    display: block;
}

img {
    height: auto;
}

/* Minimalist Line Icons */
.bp-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}
.bp-icon.sm {
    width: 14px;
    height: 14px;
}
.bp-icon.lg {
    width: 19px;
    height: 19px;
}
.liked .bp-icon-heart,
.bookmarked .bp-icon-bookmark,
.saved .bp-icon-bookmark {
    fill: currentColor;
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    width: 0%;
    z-index: 2000;
    transition: width 0.1s linear;
}

/* Top Announcement / Manifesto Strip */
.manifesto-bar {
    background: #0c0c0c;
    color: #c8c5be;
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 7px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #222;
    max-width: 100%;
}
.manifesto-bar strong {
    color: #fff;
    font-weight: 600;
}
.manifesto-bar-links {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-shrink: 0;
}
.manifesto-bar-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.manifesto-bar-links a:hover {
    color: #fff;
}
@media (max-width: 820px) {
    .manifesto-bar {
        display: none;
    }
}

/* Editorial Header — Strictly Contained Within Viewport */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: 100vw;
}

.header-inner {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
@media (max-width: 640px) {
    .header-inner {
        padding: 11px 16px;
        gap: 8px;
    }
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 1;
}

.brand-wordmark {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(20px, 2.4vw, 27px);
    letter-spacing: -0.045em;
    line-height: 1;
    color: var(--text);
    display: inline-flex;
    align-items: flex-start;
    white-space: nowrap;
}
.brand-wordmark .reg {
    font-size: 10px;
    font-weight: 700;
    margin-top: 1px;
    margin-left: 1px;
    color: var(--accent);
}

.brand-tagline {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-muted);
    border-left: 1.5px solid var(--accent);
    padding-left: 10px;
    line-height: 1.2;
    display: none;
    white-space: nowrap;
}
@media (min-width: 1260px) {
    .brand-tagline { display: block; }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}
.main-nav a {
    position: relative;
    padding: 4px 0;
    white-space: nowrap;
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.22s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}
@media (max-width: 1150px) {
    .main-nav a:nth-child(n+5):not(:last-child) {
        display: none;
    }
}
@media (max-width: 900px) {
    .main-nav { display: none; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#live-search-input {
    background: var(--bg-alt) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 12.5px !important;
    width: 140px !important;
    transition: width 0.2s ease, border-color 0.2s ease !important;
}
#live-search-input:focus {
    width: 180px !important;
    border-color: var(--text) !important;
}
/* On mobile/tablet, search & saved are in the bottom app bar so header never overflows */
@media (max-width: 768px) {
    #live-search-input {
        display: none !important;
    }
    #open-saved-btn .saved-label {
        display: none !important;
    }
}

.icon-btn {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font-sans);
    white-space: nowrap;
    flex-shrink: 0;
}
.icon-btn:hover {
    border-color: var(--text);
}
#theme-toggle-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0 11px;
    height: 36px;
}
#theme-toggle-btn:hover {
    border-color: var(--text);
    background: var(--bg-alt);
}

.icon-btn .badge-count {
    background: var(--text);
    color: var(--bg);
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
}

/* Container */
.colossal-container {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: hidden;
}
@media (max-width: 640px) {
    .colossal-container {
        padding: 0 16px;
    }
}

/* Hero Editorial Bento */
.hero-showcase {
    padding: 24px 0 22px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}
.hero-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.eyebrow-tag {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.eyebrow-tag::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.hero-bento {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 24px;
    width: 100%;
}
@media (max-width: 980px) {
    .hero-bento {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

.hero-main-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #111;
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    min-width: 0;
}
@media (max-width: 640px) {
    .hero-main-card {
        min-height: 320px;
        border-radius: var(--radius-md);
    }
}
.hero-main-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0.88;
}
.hero-main-card:hover img {
    transform: scale(1.035);
    opacity: 0.95;
}
.hero-main-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 36px 30px 28px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 62%, transparent 100%);
    color: #fff;
}
@media (max-width: 640px) {
    .hero-main-overlay {
        padding: 20px 16px 18px;
    }
}
.hero-main-overlay .cat-pill {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 9px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}
.hero-main-overlay h1 {
    font-family: var(--font-serif);
    font-size: clamp(24px, 3.4vw, 40px);
    font-weight: 500;
    line-height: 1.12;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.hero-main-overlay p {
    font-size: 14px;
    color: rgba(255,255,255,0.84);
    max-width: 600px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.72);
}

.hero-side-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}
.hero-side-card {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    min-width: 0;
}
@media (max-width: 480px) {
    .hero-side-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        padding: 8px;
    }
}
.hero-side-card:hover {
    border-color: var(--border);
    background: var(--bg-elevated);
}
.hero-side-thumb {
    width: 100%;
    height: 104px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #222;
}
@media (max-width: 480px) {
    .hero-side-thumb {
        height: 76px;
    }
}
.hero-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-side-card:hover .hero-side-thumb img {
    transform: scale(1.05);
}
.hero-side-info {
    min-width: 0;
}
.hero-side-info .side-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 3px;
    display: block;
}
.hero-side-info h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.22;
    margin-bottom: 4px;
    overflow-wrap: break-word;
}
.hero-side-info .side-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Discovery & Filter Toolbar — Contained & Non-Overflowing */
.discovery-toolbar {
    position: sticky;
    top: 62px;
    z-index: 800;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px 0;
    margin: 18px 0 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}
@media (max-width: 768px) {
    .discovery-toolbar {
        top: 58px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

.category-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.category-pills::-webkit-scrollbar {
    display: none;
}

.cat-filter-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.16s ease;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.cat-filter-btn .count {
    font-size: 10px;
    opacity: 0.6;
}
.cat-filter-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}
.cat-filter-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.sort-select {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
}

.view-switcher {
    display: inline-flex;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
}
.view-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
}
.view-btn.active {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Feed Layouts */
.editorial-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 26px;
    margin-bottom: 60px;
    width: 100%;
}
@media (max-width: 1080px) {
    .editorial-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
}
@media (max-width: 680px) {
    .editorial-feed { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}

@media (min-width: 1081px) {
    .editorial-feed.mode-colossal .story-card.featured-span {
        grid-column: span 2;
    }
    .editorial-feed.mode-colossal .story-card.featured-span .card-media {
        aspect-ratio: 16 / 10;
    }
    .editorial-feed.mode-colossal .story-card.featured-span .card-title {
        font-size: 26px;
    }
}

.editorial-feed.mode-social {
    grid-template-columns: minmax(0, 660px);
    justify-content: center;
    gap: 36px;
}
.editorial-feed.mode-social .story-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--card-shadow);
}
.editorial-feed.mode-social .card-media {
    aspect-ratio: auto;
    max-height: 640px;
}

.editorial-feed.mode-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 820px) {
    .editorial-feed.mode-compact {
        grid-template-columns: minmax(0, 1fr);
    }
}
.editorial-feed.mode-compact .story-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.editorial-feed.mode-compact .card-media {
    aspect-ratio: 1 / 1;
    margin-bottom: 0;
}
.editorial-feed.mode-compact .card-excerpt {
    display: none;
}

/* Story Card */
.story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

.card-media {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-alt);
    aspect-ratio: 4 / 3;
    margin-bottom: 12px;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.story-card:hover .card-media img {
    transform: scale(1.04);
}

.card-floating-tools {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 3;
}
.story-card:hover .card-floating-tools {
    opacity: 1;
    transform: translateY(0);
}
@media (hover: none), (max-width: 768px) {
    .card-floating-tools {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-pill-btn {
    background: rgba(15, 15, 15, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.16);
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.16s ease;
}
.tool-pill-btn:hover {
    background: #000;
    border-color: rgba(255,255,255,0.4);
}
.tool-pill-btn.saved {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.card-gallery-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 15, 15, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}
.card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.card-cat-link {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.card-cat-link:hover {
    text-decoration: underline;
}
.card-read-time {
    color: var(--text-light);
    font-weight: 500;
    flex-shrink: 0;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
    overflow-wrap: break-word;
}
.card-title a:hover {
    color: var(--accent);
}

.card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.58;
    margin-bottom: 14px;
    flex: 1;
    overflow-wrap: break-word;
}

/* Minimal Social Action Footer on Every Card */
.card-social-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}
.social-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.social-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.16s ease;
    font-family: var(--font-sans);
}
.social-btn:hover {
    background: var(--bg-alt);
    color: var(--text);
}
.social-btn.liked {
    color: var(--accent);
}
.social-btn.bookmarked {
    color: var(--accent);
}
.card-date {
    font-size: 11.5px;
    color: var(--text-light);
}

/* Single Article Page Layout */
.article-header {
    max-width: 840px;
    margin: 30px auto 24px;
    text-align: center;
}
.article-header .cat-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.article-header .cat-badge {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 4px 11px;
    border-radius: 999px;
}
.article-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 4.5vw, 50px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    overflow-wrap: break-word;
}
.article-byline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.byline-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}
.byline-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.article-layout {
    max-width: 920px;
    margin: 0 auto 56px;
    position: relative;
}

.floating-share-rail {
    position: sticky;
    top: 130px;
    float: left;
    margin-left: -80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}
@media (max-width: 1140px) {
    .floating-share-rail {
        position: static;
        float: none;
        margin: 0 auto 22px;
        flex-direction: row;
        justify-content: center;
    }
}
.rail-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: all 0.18s ease;
}
.rail-btn span {
    font-size: 8.5px;
    font-weight: 700;
}
.rail-btn:hover {
    border-color: var(--text);
    transform: translateY(-1px);
}
.rail-btn.liked, .rail-btn.bookmarked {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.76;
    color: var(--text);
    overflow-wrap: break-word;
}
@media (max-width: 640px) {
    .article-body {
        font-size: 16px;
        line-height: 1.7;
    }
}
.article-body p {
    margin-bottom: 20px;
}
.article-body img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 24px auto;
    box-shadow: var(--card-shadow);
}
.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Colossal Bento Photo Gallery inside Articles */
.colossal-gallery {
    display: grid;
    gap: 12px;
    margin: 28px 0;
    width: 100%;
}
.colossal-gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.colossal-gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.colossal-gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 680px) {
    .colossal-gallery.cols-2,
    .colossal-gallery.cols-3,
    .colossal-gallery.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}
.colossal-gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-alt);
    min-width: 0;
}
.colossal-gallery-item a {
    display: block;
    position: relative;
    overflow: hidden;
}
.colossal-gallery-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: transform 0.45s ease;
}
.colossal-gallery-item:hover img {
    transform: scale(1.05);
}
.colossal-gallery-item .zoom-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.68);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.colossal-gallery-item:hover .zoom-badge {
    opacity: 1;
}
.colossal-gallery-item figcaption {
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 8px;
    text-align: center;
}

.colossal-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin: 26px 0;
    background: #000;
    width: 100%;
}
.colossal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Tags & Prev/Next */
.article-tags {
    max-width: 760px;
    margin: 28px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tag-chip {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
}
.tag-chip:hover {
    border-color: var(--text);
    color: var(--text);
}

.article-nav-grid {
    max-width: 760px;
    margin: 32px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
@media (max-width: 560px) {
    .article-nav-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
.nav-card {
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.nav-card:hover {
    background: var(--border);
}
.nav-card span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.nav-card strong {
    font-family: var(--font-serif);
    font-size: 16.5px;
    overflow-wrap: break-word;
}

/* Comments Section */
.comments-section {
    max-width: 760px;
    margin: 44px auto;
}
.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--text);
}
.comments-header h3 {
    font-family: var(--font-serif);
    font-size: 22px;
}
.comment-card {
    padding: 15px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    overflow-wrap: break-word;
}
.comment-card.depth-2, .comment-card.depth-3 {
    margin-left: 18px;
    border-left: 2.5px solid var(--accent);
}
.comment-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-top img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.comment-author-name {
    font-weight: 700;
    font-size: 13px;
}
.comment-author-badge {
    background: var(--accent);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
}
.comment-date {
    font-size: 11px;
    color: var(--text-light);
}
.comment-body {
    font-size: 14px;
    line-height: 1.58;
}
.comment-body p {
    margin-bottom: 8px;
}

/* Modals: Quick-Look Story Modal, Lightbox, Saved Drawer */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
}
.modal-backdrop.open {
    display: flex;
}

.quicklook-dialog {
    background: var(--bg);
    color: var(--text);
    width: 100%;
    max-width: 1020px;
    max-height: 88vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    position: relative;
}
@media (max-width: 860px) {
    .quicklook-dialog {
        grid-template-columns: minmax(0, 1fr);
        max-height: 86vh;
        overflow-y: auto;
    }
}
.quicklook-media-pane {
    background: #090909;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height: 86vh;
}
@media (max-width: 860px) {
    .quicklook-media-pane {
        min-height: 240px;
        max-height: 42vh;
    }
}
.quicklook-media-pane img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
}
@media (max-width: 860px) {
    .quicklook-media-pane img {
        max-height: 40vh;
    }
}
.ql-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ql-nav-btn:hover { background: var(--accent); }
.ql-nav-btn.prev { left: 12px; }
.ql-nav-btn.next { right: 12px; }
.ql-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
}

.quicklook-content-pane {
    padding: 24px 22px;
    overflow-y: auto;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}
.ql-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(20,20,20,0.75);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    z-index: 10;
}

/* Fullscreen Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
    max-width: 94vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox-caption {
    color: #ddd;
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* Saved Drawer — Uses transform instead of negative right so it NEVER causes mobile horizontal scroll */
.saved-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 380px;
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 3500;
    padding: 22px 18px calc(80px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -16px 0 40px rgba(0,0,0,0.22);
    pointer-events: none;
}
.saved-drawer.open {
    transform: translateX(0);
    pointer-events: auto;
}
.saved-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.saved-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.saved-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
}
.saved-item img {
    width: 64px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.saved-item h4 {
    font-family: var(--font-serif);
    font-size: 14px;
    line-height: 1.25;
}

/* ==========================================================================
   MOBILE APP BOTTOM TAB BAR & CHANNELS SHEET (Minimal Line Icons)
   ========================================================================== */
.mobile-app-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    z-index: 2500;
}
@media (max-width: 900px) {
    .mobile-app-bar {
        display: grid;
    }
}

.mob-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    transition: color 0.16s ease;
}
.mob-tab-btn.active,
.mob-tab-btn:active {
    color: var(--text);
}
.mob-tab-btn.surprise-center .mob-icon-wrap {
    background: var(--text);
    color: var(--bg);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -2px;
}
.mob-tab-btn .mob-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 999px;
    min-width: 14px;
    text-align: center;
}

/* Mobile Slide-Up Bottom Sheet */
.mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(4px);
    z-index: 3200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.mobile-sheet-backdrop.open {
    display: flex;
}
.mobile-bottom-sheet {
    background: var(--bg);
    color: var(--text);
    width: 100%;
    max-width: 600px;
    max-height: 82vh;
    border-radius: 20px 20px 0 0;
    padding: 14px 18px calc(76px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    box-shadow: 0 -12px 40px rgba(0,0,0,0.3);
    animation: sheetSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    margin: 0 auto 14px;
}
.sheet-grid-channels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}
.sheet-channel-link {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sheet-channel-link:hover,
.sheet-channel-link:active {
    border-color: var(--text);
}
.sheet-channel-link span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Toast Notification */
#colossal-toast {
    position: fixed;
    bottom: 76px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    white-space: nowrap;
}
#colossal-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Footer */
.site-footer {
    background: #0d0d0e;
    color: #d6d3cd;
    padding: 56px 0 40px;
    margin-top: 64px;
    border-top: 3px solid var(--accent);
    width: 100%;
    overflow-x: hidden;
}
.footer-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}
@media (max-width: 820px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 0 16px; }
}
.footer-brand h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}
.footer-brand p {
    color: #9e9b95;
    font-size: 13.5px;
    max-width: 420px;
    margin-bottom: 14px;
}
.footer-col h4 {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 12px;
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
}
.footer-links a {
    color: #9e9b95;
}
.footer-links a:hover {
    color: #fff;
}
.footer-bottom-bar {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 24px 0;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #777;
}
@media (max-width: 640px) {
    .footer-bottom-bar {
        padding: 18px 16px 0;
    }
}
