/*
  SINGLE POST TEMPLATE
  Tokyo Trip Guide — Custom WordPress Theme
  ─────────────────────────────────────────────────────
*/

/* ══════════════════════════════════════════════════
   POST HEADER
   ══════════════════════════════════════════════════ */
.post-header {
    padding-block: clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--p2);
}

.post-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}

.post-headline {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 4.5vw, 3.25rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
    font-optical-sizing: auto;
    max-width: 22ch;
}

.post-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    font-size: 0.82rem;
    color: var(--p3);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--ink3);
    transition: color var(--t);
}

.post-author:hover {
    color: var(--r);
}

.post-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--p2);
}

.post-author-name {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.82rem;
}

.post-meta-divider {
    width: 1px;
    height: 14px;
    background: var(--p2);
}

.post-date {
    color: var(--p3);
}

.post-updated {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--p3);
}

.post-updated-label {
    font-family: var(--cond);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r);
    margin-top: 5px;
}

.post-reading-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--p3);
}

.post-reading-time svg {
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   FEATURED IMAGE
   ══════════════════════════════════════════════════ */
.post-featured-image {
    padding-block: 0 clamp(3.5rem, 3vw, 2.5rem);
    background: var(--p);
    margin-bottom: 2rem;
}

.post-featured-figure {
    margin: 0;
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.post-featured-img {
    object-fit: cover;
    display: block;
    height: auto;
    width: 100%;
    border-radius: var(--r2);
    box-shadow: var(--sh-sm);
}

/* ══════════════════════════════════════════════════
   POST SUBTITLE
   ══════════════════════════════════════════════════ */
.post-subtitle {
    font-family: var(--sans);
    font-size: clamp(.95rem, 1.6vw, 1.05rem);
    color: var(--ink3);
    line-height: 1.7;
    max-width: 62ch;
    margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════════════
   CONTENT LAYOUT — TWO COLUMN
   ══════════════════════════════════════════════════ */
.post-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

@media (max-width: 960px) {
    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-toc-sidebar {
        order: -1;
        /* Remove sticky on mobile — it causes the sidebar to overlap content */
        position: static !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
}

/* ══════════════════════════════════════════════════
   TOC SIDEBAR
   ══════════════════════════════════════════════════ */
.post-toc-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--p2) transparent;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.post-toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.post-toc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.post-toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--p2);
    border-radius: 2px;
}

.post-toc-inner {
    background: var(--p);
    border: 1px solid var(--p2);
    border-radius: var(--r2);
    padding: 1rem 1.1rem;
}

.post-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--p2);
}

.post-toc-title {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--p3);
}

.post-toc-toggle-all {
    font-size: 0.72rem;
    color: var(--r);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.post-toc-toggle-all:hover {
    opacity: 0.7;
}

.post-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* H2 items — always visible */
.toc-item {
    border-bottom: 1px solid var(--p2);
}

.toc-item:last-child {
    border-bottom: none;
}

.toc-link {
    display: block;
    font-size: 0.8rem;
    color: var(--ink3);
    text-decoration: none;
    padding: 0.45rem 0.25rem;
    line-height: 1.4;
    transition: color 0.2s;
    font-weight: 500;
}

.toc-link:hover {
    color: var(--r);
}

.toc-link.toc-link--active {
    color: var(--r);
    font-weight: 700;
}

/* H3/H4 sub-items — hidden by default, shown when expanded */
.toc-sub-item {
    display: none;
}

.toc-sub-item.toc-expanded {
    display: block;
}

.toc-sub-link {
    display: block;
    font-size: 0.75rem;
    color: var(--p3);
    text-decoration: none;
    padding: 0.3rem 0.25rem 0.3rem 1rem;
    line-height: 1.4;
    transition: color 0.2s, border-left-color 0.2s;
    border-left: 2px solid var(--p2);
    margin-left: 0.25rem;
}

.toc-sub-link:hover {
    color: var(--r);
    border-left-color: var(--r);
}

.toc-sub-link.toc-link--active {
    color: var(--r);
    border-left-color: var(--r);
}

/* ══════════════════════════════════════════════════
   POST CONTENT PROSE
   ══════════════════════════════════════════════════ */
.post-content {
    min-width: 0;
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: var(--ink3);
    line-height: 1.78;
}

.post-content h2 {
    font-family: var(--serif);
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 2.5rem 0 0.75rem;
    line-height: 1.15;
    font-optical-sizing: auto;
    scroll-margin-top: 90px;
}

.post-content h3 {
    font-family: var(--serif);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 2rem 0 0.6rem;
    line-height: 1.2;
    font-optical-sizing: auto;
    scroll-margin-top: 90px;
}

.post-content h4 {
    font-family: var(--serif);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin: 1.75rem 0 0.5rem;
    line-height: 1.25;
    scroll-margin-top: 90px;
}

.post-content h5 {
    font-family: var(--sans);
    font-size: clamp(0.9rem, 1.1vw, 1.0rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0;
    margin: 1.5rem 0 0.4rem;
    line-height: 1.3;
    scroll-margin-top: 90px;
}

.post-content h6 {
    font-family: var(--cond);
    font-size: clamp(0.75rem, 0.85vw, 0.82rem);
    font-weight: 800;
    color: var(--r);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 1.25rem 0 0.35rem;
    line-height: 1.3;
    scroll-margin-top: 90px;
}

.post-content p {
    margin-bottom: 1.1rem;
    max-width: none;
}

.post-content a {
    color: var(--r);
    text-decoration: underline;
    text-decoration-color: rgba(193, 40, 26, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.post-content a:hover {
    text-decoration-color: var(--r);
}

.post-content ul,
.post-content ol {
    padding-left: 2.5rem;
    margin-bottom: 1.1rem;
}

.post-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
    max-width: none;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content ul li::marker {
    color: var(--r);
}

.post-content ol li::marker {
    color: var(--r);
    font-weight: 700;
}

.post-content strong {
    font-weight: 700;
    color: var(--ink);
}

.post-content em {
    font-style: italic;
}

.post-content blockquote {
    border-left: 3px solid var(--r);
    padding: 0.75rem 1.25rem;
    margin: 1.75rem 0;
    background: var(--rt);
    border-radius: 0 var(--r1) var(--r1) 0;
    font-style: italic;
    color: var(--ink2);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r2);
    margin-block: 1.5rem;
    box-shadow: var(--sh-sm);
}

.post-content figure,
.post-content .wp-caption {
    margin: 1.75rem 0;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

.post-content figure img,
.post-content .wp-caption img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--r2);
    margin: 0;
    box-shadow: var(--sh-sm);
}

.post-content figcaption,
.post-content .wp-caption-text {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: normal;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--p3);
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.3rem 0;
    background: transparent;
    font-style: normal;
}

.post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.post-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.post-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

@media (max-width: 768px) {

    .post-content .alignleft,
    .post-content .alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--p2);
    margin: 2rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    background: var(--p);
    border-radius: var(--r2);
    overflow: hidden;
}

.post-content th {
    background: var(--p);
    font-weight: 700;
    color: var(--ink);
    padding: 0.6rem 0.85rem;
    text-align: left;
    border-bottom: 2px solid var(--p2);
}

.post-content td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--p2);
    color: var(--ink3);
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content pre {
    background: var(--ink);
    color: var(--p);
    padding: 1.25rem;
    border-radius: var(--r1);
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.post-content code {
    font-family: 'Courier New', monospace;
    background: var(--p);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--r);
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ══════════════════════════════════════════════════
   SOCIAL SHARE
   ══════════════════════════════════════════════════ */
.post-share {
    padding-block: 1.5rem;
    border-top: 1px solid var(--p2);
    border-bottom: 1px solid var(--p2);
}

.post-share-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.post-share-label {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--p3);
    flex-shrink: 0;
}

.post-share-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 5px 12px;
    border-radius: var(--rp);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.post-share-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.post-share-btn svg {
    flex-shrink: 0;
}

.post-share-btn--facebook {
    background: #1877f2;
    color: #fff;
}

.post-share-btn--twitter {
    background: var(--ink);
    color: #fff;
}

.post-share-btn--pinterest {
    background: #e60023;
    color: #fff;
}

.post-share-btn--whatsapp {
    background: #25d366;
    color: #fff;
}

.post-share-btn--copy {
    background: var(--p);
    color: var(--ink3);
    border: 1px solid var(--p2);
}

.post-share-btn--copy.copied {
    background: var(--rt);
    color: var(--r);
    border-color: var(--r);
}

/* ══════════════════════════════════════════════════
   AUTHOR BIO
   ══════════════════════════════════════════════════ */
.author-bio-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
    background: var(--p) !important;
    border: 1px solid var(--p2) !important;
    border-radius: var(--r2) !important;
    padding: 1.5rem !important;
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
}

.author-bio-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid var(--p2) !important;
    flex-shrink: 0 !important;
}

.author-bio-label {
    font-family: var(--cond) !important;
    font-size: 0.6rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--p3) !important;
    margin-bottom: 0.25rem !important;
}

.author-bio-name {
    font-family: var(--serif) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--ink) !important;
    text-decoration: none !important;
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-optical-sizing: auto !important;
    transition: color var(--t) !important;
}

.author-bio-name:hover {
    color: var(--r) !important;
}

.author-bio-text {
    font-size: 0.88rem !important;
    color: var(--ink3) !important;
    line-height: 1.65 !important;
    margin: 0 !important;
    max-width: 62ch !important;
}

.author-social {
    display: flex !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
}

.author-social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: var(--p2) !important;
    color: var(--ink3) !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.author-social-link:hover {
    background: var(--r) !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.author-social-link svg {
    flex-shrink: 0 !important;
}

@media (max-width: 480px) {
    .author-bio-card {
        flex-direction: column !important;
    }

    .author-social {
        justify-content: center !important;
    }
}

/* ══════════════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════════════ */
.post-faq {
    border-top: 1px solid var(--p2);
}

.post-faq-header {
    margin-bottom: 1.5rem;
}

.faq-list {
    border-top: 1px solid var(--p2);
}

.faq-item {
    border-bottom: 1px solid var(--p2);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity var(--t);
}

.faq-trigger:hover {
    opacity: 0.8;
}

.faq-question {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    line-height: 1.3;
    font-optical-sizing: auto;
}

.faq-icon {
    flex-shrink: 0;
    transition: transform var(--t);
    color: var(--r);
}

.faq-trigger[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-panel {
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
    max-height: 0;
}

.faq-answer {
    padding-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink3);
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.faq-answer ul { list-style: disc; }
.faq-answer ol { list-style: decimal; }

.faq-answer li {
    margin-bottom: 0.35rem;
    line-height: 1.65;
}

.faq-answer ul li::marker { color: var(--r); }
.faq-answer ol li::marker { color: var(--r); font-weight: 700; }

.faq-answer strong { font-weight: 700; color: var(--ink); }
.faq-answer em { font-style: italic; }

.faq-answer a {
    color: var(--r);
    text-decoration: underline;
    text-decoration-color: rgba(193, 40, 26, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--t);
}
.faq-answer a:hover { text-decoration-color: var(--r); }

/* ══════════════════════════════════════════════════
   RELATED POSTS CAROUSEL
   ══════════════════════════════════════════════════ */
.post-related {
    border-top: 1px solid var(--p2);
}

.related-swiper {
    padding-bottom: 2.5rem;
    margin-top: 1.5rem;
}

.related-swiper .swiper-slide {
    height: auto;
}

.related-card {
    display: block;
    text-decoration: none;
    background: var(--w);
    border: 1px solid var(--p2);
    border-radius: var(--r2);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
}

.related-card:hover {
    box-shadow: 0 4px 20px rgba(26, 23, 20, 0.1);
    transform: translateY(-2px);
}

.related-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--p2);
}

.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}

.related-card:hover .related-card-img img {
    transform: scale(1.04);
}

.related-card-body {
    padding: 0.85rem 1rem;
}

.related-card-cat {
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--r);
    margin-bottom: 0.4rem;
}

.related-card-title {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 0.4rem;
    font-optical-sizing: auto;
}

.related-card-meta {
    font-size: 0.75rem;
    color: var(--p3);
}

/* Swiper navigation */
.related-swiper .swiper-button-prev,
.related-swiper .swiper-button-next {
    width: 40px;
    height: 40px;
    background: var(--w);
    border: 1px solid var(--p2);
    border-radius: 50%;
    color: var(--ink);
    transition: all var(--t);
}

.related-swiper .swiper-button-prev:after,
.related-swiper .swiper-button-next:after {
    font-size: 16px;
    font-weight: 900;
}

.related-swiper .swiper-button-prev:hover,
.related-swiper .swiper-button-next:hover {
    background: var(--r);
    color: var(--w);
    border-color: var(--r);
}

.related-swiper .swiper-button-prev.swiper-button-disabled,
.related-swiper .swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Swiper pagination */
.related-swiper .swiper-pagination {
    bottom: 0;
}

.related-swiper .swiper-pagination-bullet {
    background: var(--p3);
    opacity: 1;
    width: 8px;
    height: 8px;
    transition: all var(--t);
}

.related-swiper .swiper-pagination-bullet-active {
    background: var(--r);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 768px) {

    .related-swiper .swiper-button-prev,
    .related-swiper .swiper-button-next {
        display: none;
    }
}

/* ══════════════════════════════════════════════════
   DISCLAIMER
   ══════════════════════════════════════════════════ */
.post-disclaimer {
    padding-block: 1rem;
    border-top: 1px solid var(--p2);
}

.post-disclaimer-text {
    font-size: 0.78rem;
    color: var(--p3);
    line-height: 1.65;
    margin: 0;
    max-width: none;
}

/* ══════════════════════════════════════════════════
   QUICK FACTS WIDGET
   ══════════════════════════════════════════════════ */
.quick-facts-box {
    background: var(--rt);
    border: 1px solid rgba(193, 40, 26, 0.2);
    border-radius: var(--r2);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
}

.quick-facts-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r);
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(193, 40, 26, 0.2);
}

.quick-facts-head svg {
    flex-shrink: 0;
    color: var(--r);
}

.quick-facts-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.qf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(193, 40, 26, 0.15);
}

.qf-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.qf-row:first-child {
    padding-top: 0;
}

.qf-label {
    font-size: 0.8rem;
    color: var(--ink3);
    font-weight: 500;
}

.qf-value {
    font-size: 0.8rem;
    color: var(--ink);
    font-weight: 700;
    text-align: right;
}

/* ══════════════════════════════════════════════════
   SUMMARIZE WITH AI
   ══════════════════════════════════════════════════ */
.post-content .share-with-ai {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin: 1rem 0 2.5rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--r);
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-family: var(--sans);
}

.post-content .share-with-ai .share-ai-text {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--p3);
    flex-shrink: 0;
    margin-right: 0 !important;
}

.post-content .share-with-ai .share-ai-text span {
    color: var(--p3) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
}

.post-content .share-with-ai .share-ai {
    display: inline-flex !important;
    background: transparent !important;
    border-radius: var(--rp) !important;
    overflow: hidden;
}

.post-content .share-with-ai .share-ai a,
.post-content .share-with-ai .summarize-with-ai-icon {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 5px 12px !important;
    border-radius: var(--rp) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: opacity 0.2s, transform 0.15s !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
}

.post-content .share-with-ai .share-ai a:hover,
.post-content .share-with-ai .summarize-with-ai-icon:hover {
    opacity: 0.85 !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

.post-content .share-with-ai .share-ai img {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: inline-block !important;
}

.post-content .share-with-ai .share-ai span {
    color: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* ChatGPT - Override plugin black background */
.post-content .share-with-ai .share-ai.chatgpt,
.post-content .share-with-ai .share-ai.chatgpt a,
.post-content .share-with-ai .share-ai.chatgpt .summarize-with-ai-icon,
.post-content .share-with-ai .share-ai.chatgpt a:link,
.post-content .share-with-ai .share-ai.chatgpt a:visited,
.post-content .share-with-ai .share-ai.chatgpt a:hover,
.post-content .share-with-ai .summarize-with-chatgpt,
.post-content .share-with-ai .summarize-with-chatgpt:hover {
    background: #10a37f !important;
    background-color: #10a37f !important;
    color: #fff !important;
    border-color: #10a37f !important;
}

/* Grok - Override plugin black background */
.post-content .share-with-ai .share-ai.grok,
.post-content .share-with-ai .share-ai.grok a,
.post-content .share-with-ai .share-ai.grok .summarize-with-ai-icon,
.post-content .share-with-ai .share-ai.grok a:link,
.post-content .share-with-ai .share-ai.grok a:visited,
.post-content .share-with-ai .share-ai.grok a:hover,
.post-content .share-with-ai .summarize-with-grok,
.post-content .share-with-ai .summarize-with-grok:hover {
    background: var(--ink) !important;
    background-color: var(--ink) !important;
    color: #fff !important;
    border-color: var(--ink) !important;
}

/* Perplexity - Override plugin background */
.post-content .share-with-ai .share-ai.perplexity,
.post-content .share-with-ai .share-ai.perplexity a,
.post-content .share-with-ai .share-ai.perplexity .summarize-with-ai-icon,
.post-content .share-with-ai .share-ai.perplexity a:link,
.post-content .share-with-ai .share-ai.perplexity a:visited,
.post-content .share-with-ai .share-ai.perplexity a:hover,
.post-content .share-with-ai .summarize-with-perplexity,
.post-content .share-with-ai .summarize-with-perplexity:hover {
    background: #1fb8cd !important;
    background-color: #1fb8cd !important;
    color: #fff !important;
    border-color: #1fb8cd !important;
}

/* Claude - Override plugin background */
.post-content .share-with-ai .share-ai.claude,
.post-content .share-with-ai .share-ai.claude a,
.post-content .share-with-ai .share-ai.claude .summarize-with-ai-icon,
.post-content .share-with-ai .share-ai.claude a:link,
.post-content .share-with-ai .share-ai.claude a:visited,
.post-content .share-with-ai .share-ai.claude a:hover,
.post-content .share-with-ai .summarize-with-claude,
.post-content .share-with-ai .summarize-with-claude:hover {
    background: #cc785c !important;
    background-color: #cc785c !important;
    color: #fff !important;
    border-color: #cc785c !important;
}

/* ══════════════════════════════════════════════════
   POST NAVIGATION (PREV/NEXT)
   ══════════════════════════════════════════════════ */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--p2);
}

@media (max-width: 640px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--p);
    border: 1px solid var(--p2);
    border-radius: var(--r2);
    text-decoration: none;
    transition: all var(--t);
}

.post-nav-link:hover {
    background: var(--w);
    border-color: var(--r);
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
}

.post-nav-label {
    font-family: var(--cond);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-nav-label svg {
    flex-shrink: 0;
}

.post-nav-title {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    font-optical-sizing: auto;
}

.post-nav-link--next {
    text-align: right;
}

.post-nav-link--next .post-nav-label {
    justify-content: flex-end;
}

/* ══════════════════════════════════════════════════
   SPECIFIC RESPONSIVE RULES
   ══════════════════════════════════════════════════ */
@media (max-width: 640px) {

    .post-content ul,
    .post-content ol {
        padding-left: 1.5rem !important;
    }
}

/* @media (max-width: 768px) {
    .post-content table,
    .post-content thead,
    .post-content tbody,
    .post-content th,
    .post-content td,
    .post-content tr {
        display: block;
    }

    .post-content thead {
        display: none;
    }

    .post-content tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        padding: 0.5rem;
    }

    .post-content td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem;
    }

    .post-content td::before {
        content: attr(data-label);
        font-weight: bold;
    }
} */

/* Carousel arrows: beside the section title instead of floating over the
   first/last card (where the 40px circle overlapped the card image). */
.post-related .wrap {
    position: relative;
}

.related-swiper {
    position: static;
}

.related-swiper .swiper-button-prev,
.related-swiper .swiper-button-next {
    left: auto;
    margin-top: 0;
    right: 0;
    top: 1.1rem;
}

.related-swiper .swiper-button-prev {
    right: 50px;
}
