/*
Theme Name: TaiwanLabo2026
Theme URI: https://taiwan.laboratory.ne.jp/
Author: Minoru Sakai / Taiwan Labo
Description: 台湾ラボ 2026年リニューアルテーマ
Version: 0.4.1
Text Domain: taiwanlabo2026
*/

:root {
    --paper: #fffaf6;
    --white: #ffffff;
    --ink: #403937;
    --muted: #756c68;
    --accent: #b65e72;
    --accent-dark: #7d3f50;
    --jade: #648a79;
    --jade-light: #eaf2ee;
    --sand: #ead8c8;
    --line: #eadfd8;
    --shadow: 0 8px 28px rgba(80,55,48,.08);
    --radius: 18px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        "Yu Gothic",
        "Meiryo",
        sans-serif;
    font-size: 16px;
    line-height: 1.85;
}

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

a {
    color: var(--accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

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

.site-wrap {
    width: min(1180px, calc(100% - 36px));
    margin-inline: auto;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,250,246,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-brand {
    margin-right: auto;
}

.site-title {
    display: block;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
}

.site-tagline {
    margin-top: -5px;
    color: var(--muted);
    font-size: 12px;
}

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.primary-nav a {
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.primary-nav a:hover {
    color: var(--accent);
}

/* HERO */

.hero {
    padding: clamp(46px, 7vw, 90px) 0 52px;
    background:
        radial-gradient(circle at 82% 20%, #f2ddd9 0, transparent 28%),
        radial-gradient(circle at 15% 65%, #e4efe9 0, transparent 28%);
}

.hero-inner {
    max-width: 820px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--jade);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
    font-size: clamp(36px, 7vw, 70px);
    line-height: 1.2;
    letter-spacing: .03em;
}

.hero-copy {
    max-width: 650px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 19px);
}

/* SECTIONS */

.home-section {
    padding: 64px 0;
}

.home-section + .home-section {
    border-top: 1px solid var(--line);
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
    font-size: clamp(26px, 4vw, 38px);
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

/* TAIWAN MAP */

.map-layout {
    display: grid;
    grid-template-columns: minmax(280px, 560px) 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.taiwan-map-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 680 / 964;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.taiwan-map-frame object {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.region-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.region-links a {
    display: inline-block;
    padding: 8px 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
}

.region-links a:hover {
    color: var(--accent-dark);
    border-color: var(--accent);
    background: #fff3f5;
}

/* CATEGORY */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    min-height: 132px;
    padding: 22px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 18px;
}

.category-card span {
    color: var(--muted);
    font-size: 13px;
}

/* POSTS */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.post-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--jade-light);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.025);
}

.post-card-body {
    padding: 20px;
}

.post-card-meta {
    margin-bottom: 8px;
    color: var(--jade);
    font-size: 12px;
}

.post-card h2,
.post-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
}

.post-card h2 a,
.post-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.post-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* ARTICLE */

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 780px) minmax(220px, 280px);
    justify-content: space-between;
    gap: 60px;
    padding-top: 50px;
    padding-bottom: 70px;
}

.content-layout.no-sidebar {
    display: block;
    max-width: 820px;
    margin-inline: auto;
}

.article-header {
    margin-bottom: 32px;
}

.article-category {
    margin-bottom: 10px;
    color: var(--jade);
    font-size: 13px;
}

.article-title {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.35;
}

.article-date {
    color: var(--muted);
    font-size: 13px;
}

.article-featured {
    margin: 0 0 34px;
}

.article-featured img {
    width: 100%;
    border-radius: var(--radius);
}

.entry-content {
    font-size: 17px;
    line-height: 1.95;
}

.entry-content p {
    margin: 0 0 1.7em;
}

.entry-content h2 {
    margin: 2.4em 0 1em;
    padding: .75em 0 .6em .9em;
    border-left: 5px solid var(--accent);
    border-bottom: 1px solid var(--line);
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.5;
}

.entry-content h3 {
    margin: 2em 0 .9em;
    color: var(--accent-dark);
    font-size: 21px;
}

.entry-content iframe,
.entry-content object,
.entry-content embed {
    max-width: 100% !important;
}

.entry-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.entry-content img {
    border-radius: 8px;
}

.post-tags {
    margin: 40px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 42px;
}

.post-navigation a {
    display: block;
    height: 100%;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
}

.related-posts {
    margin-top: 54px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
}

.related-posts h2 {
    font-size: 25px;
}

/* SIDEBAR */

.site-sidebar {
    font-size: 14px;
}

.sidebar-box {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.sidebar-box h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.sidebar-box ul {
    margin: 0;
    padding-left: 1.2em;
}

/* ARCHIVE */

.archive-header {
    padding: 48px 0 20px;
}

.archive-header h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

/* PAGINATION */

.navigation.pagination {
    margin-top: 38px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers {
    display: inline-block;
    min-width: 40px;
    padding: 7px 10px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 9px;
    text-decoration: none;
}

.page-numbers.current {
    color: var(--white);
    background: var(--accent);
    border-color: var(--accent);
}

/* SEARCH */

.search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    font: inherit;
}

.search-submit {
    padding: 11px 15px;
    color: var(--white);
    background: var(--accent);
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

/* FOOTER */

.site-footer {
    padding: 42px 0;
    color: var(--muted);
    background: #f3ebe6;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-nav a {
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
}

.copyright {
    margin: 0;
    font-size: 12px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 8px 20px;
        padding-block: 13px;
    }

    .primary-nav {
        width: 100%;
        overflow-x: auto;
    }

    .primary-nav ul {
        gap: 18px;
    }

    .map-layout {
        grid-template-columns: 1fr;
    }

    .taiwan-map-frame {
        max-width: 520px;
        margin-inline: auto;
    }

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

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

    .content-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .site-sidebar {
        border-top: 1px solid var(--line);
        padding-top: 30px;
    }
}

@media (max-width: 600px) {
    .site-wrap {
        width: min(100% - 24px, 1180px);
    }

    .site-header {
        position: relative;
    }

    .site-tagline {
        display: none;
    }

    .hero {
        padding-top: 44px;
    }

    .home-section {
        padding: 46px 0;
    }

    .category-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .entry-content {
        font-size: 16px;
    }

    .footer-inner {
        display: block;
    }

    .copyright {
        margin-top: 18px;
    }
}


/* ==========================================================
   TaiwanLabo2026 v0.2.0 compatibility foundation
   ========================================================== */

/*
 * Existing Classic Editor content.
 * Keep old article media safely inside the content column.
 */
.entry-content img,
.page-content img,
.post-content img {
    max-width: 100%;
    height: auto;
}

.entry-content iframe,
.page-content iframe,
.post-content iframe,
.entry-content video,
.page-content video,
.post-content video {
    max-width: 100%;
}

/*
 * Modern WordPress block alignment support.
 */
.entry-content .alignwide {
    width: min(1120px, calc(100vw - 40px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.entry-content .alignfull {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.entry-content .wp-block-image img {
    height: auto;
}

/*
 * Shortcodes embedded in old Classic Editor posts remain
 * untouched. Their generated content should not overflow.
 */
.entry-content > iframe,
.entry-content .googlemap,
.entry-content .simple-map,
.entry-content [class*="map"] iframe {
    max-width: 100%;
}

/*
 * Reserved advertising containers.
 * v0.2.0 does not output these while advertising is disabled.
 */
.taiwanlabo-ad {
    width: 100%;
    clear: both;
}


/* === TaiwanLabo2026 v0.3 Phase 2 === */

/*
 * Design direction:
 * Taiwan × tea house × retro × quiet adult charm.
 */

body {
    background:
        linear-gradient(
            180deg,
            #fffaf6 0,
            #fffdfb 42%,
            #fffaf6 100%
        );
}

.site-header {
    background: rgba(255, 250, 246, .94);
    box-shadow: 0 1px 0 rgba(64, 57, 55, .05);
}

.header-inner {
    min-height: 82px;
}

.site-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    line-height: 1.05;
}

.site-brand-en {
    margin-top: 6px;
    color: var(--jade);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .25em;
}

.header-search {
    padding: 8px 14px;
    color: var(--accent-dark);
    border: 1px solid var(--sand);
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
}

.header-search:hover {
    background: #fff3f5;
}

/* Hero */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(70px, 9vw, 125px) 0;
    background:
        radial-gradient(
            circle at 83% 22%,
            rgba(182, 94, 114, .13) 0,
            rgba(182, 94, 114, 0) 30%
        ),
        radial-gradient(
            circle at 13% 80%,
            rgba(100, 138, 121, .13) 0,
            rgba(100, 138, 121, 0) 32%
        ),
        #fffaf6;
}

.hero-inner {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
    gap: clamp(40px, 8vw, 100px);
    align-items: center;
}

.hero-copy-block {
    max-width: 760px;
}

.hero h1 {
    max-width: 760px;
    font-family:
        Georgia,
        "Yu Mincho",
        "Hiragino Mincho ProN",
        serif;
    font-size: clamp(38px, 5.5vw, 68px);
    font-weight: 500;
    line-height: 1.42;
    letter-spacing: .025em;
}

.hero-copy {
    max-width: 610px;
    margin-top: 28px;
    font-size: clamp(16px, 1.7vw, 18px);
    line-height: 2;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.button-primary {
    color: #fff;
    background: var(--accent-dark);
    border: 1px solid var(--accent-dark);
}

.button-primary:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.button-secondary {
    color: var(--ink);
    background: rgba(255,255,255,.58);
    border: 1px solid var(--sand);
}

.hero-mark {
    width: min(100%, 310px);
    aspect-ratio: 1;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(182,94,114,.24);
    border-radius: 50%;
    background:
        rgba(255,255,255,.42);
    box-shadow:
        inset 0 0 0 12px rgba(255,255,255,.25),
        0 18px 60px rgba(80,55,48,.06);
}

.hero-mark-main {
    color: var(--accent-dark);
    font-family:
        "Yu Mincho",
        "Hiragino Mincho ProN",
        Georgia,
        serif;
    font-size: clamp(48px, 6vw, 72px);
    letter-spacing: .08em;
}

.hero-mark-sub {
    margin-top: 8px;
    color: var(--jade);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .32em;
}

/* Section identity */

.home-section {
    padding: clamp(68px, 8vw, 100px) 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 36px;
}

.section-heading-centered {
    margin-inline: auto;
    text-align: center;
}

.section-kicker {
    margin: 0 0 8px !important;
    color: var(--jade) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
}

.section-heading h2 {
    font-family:
        Georgia,
        "Yu Mincho",
        "Hiragino Mincho ProN",
        serif;
    font-weight: 500;
}

/* Featured regions */

.area-section {
    background: #fff;
}

.featured-regions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.featured-region {
    position: relative;
    min-height: 150px;
    padding: 25px;
    overflow: hidden;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.featured-region:hover {
    color: var(--ink);
    transform: translateY(-2px);
    border-color: var(--sand);
    box-shadow: var(--shadow);
}

.featured-region span {
    display: block;
    color: var(--jade);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
}

.featured-region strong {
    display: block;
    margin-top: 12px;
    font-family:
        "Yu Mincho",
        "Hiragino Mincho ProN",
        Georgia,
        serif;
    font-size: 27px;
    font-weight: 500;
}

.featured-region em {
    position: absolute;
    right: 22px;
    bottom: 20px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

/* Map */

.map-section {
    background:
        linear-gradient(
            135deg,
            rgba(234,242,238,.55),
            rgba(255,250,246,.25)
        );
}

.map-layout {
    max-width: 1020px;
    margin-inline: auto;
    grid-template-columns: minmax(260px, 430px) 1fr;
    align-items: center;
}

.taiwan-map-frame {
    border: 0;
    border-radius: 20px;
    background: rgba(255,255,255,.76);
    box-shadow: 0 14px 45px rgba(80,55,48,.07);
}

.map-region-panel {
    padding: clamp(10px, 3vw, 32px);
}

.map-region-intro {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 14px;
}

.region-links {
    gap: 9px;
}

.region-links a {
    padding: 8px 14px;
    background: rgba(255,255,255,.8);
    border-color: rgba(234,216,200,.9);
}

/* Themes */

.theme-section {
    background: #fff;
}

.category-grid {
    gap: 14px;
}

.category-card {
    min-height: 145px;
    padding: 24px;
    border-radius: 12px;
    box-shadow: none;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.category-card:hover {
    border-color: var(--sand);
    box-shadow: var(--shadow);
}

.category-card-label {
    display: block;
    margin-bottom: 15px;
    color: var(--jade);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
}

.category-card strong {
    font-family:
        "Yu Mincho",
        "Hiragino Mincho ProN",
        Georgia,
        serif;
    font-size: 20px;
    font-weight: 500;
}

.category-card-count {
    display: block;
    margin-top: 10px;
}

/* Latest */

.latest-section {
    background: var(--paper);
}

.post-grid {
    gap: 24px;
}

.post-card {
    border-radius: 12px;
    box-shadow: none;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.post-card-image {
    aspect-ratio: 3 / 2;
}

.post-card-body {
    padding: 22px;
}

.post-card h2,
.post-card h3 {
    font-family:
        "Yu Mincho",
        "Hiragino Mincho ProN",
        Georgia,
        serif;
    font-weight: 600;
}

.post-card-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-dark);
    font-size: 12px;
    text-decoration: none;
}

/* Tablet */

@media (max-width: 900px) {

    .primary-nav {
        display: none;
    }

    .header-search {
        margin-left: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-mark {
        width: 210px;
        justify-self: start;
    }

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

    .map-layout {
        grid-template-columns: minmax(230px, 360px) 1fr;
        gap: 28px;
    }
}

/* Mobile */

@media (max-width: 680px) {

    .site-wrap {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 68px;
    }

    .site-title {
        font-size: 25px;
    }

    .site-brand-en {
        font-size: 8px;
    }

    .header-search {
        padding: 6px 11px;
        font-size: 12px;
    }

    .hero {
        padding: 60px 0 64px;
    }

    .hero h1 {
        font-size: clamp(35px, 11vw, 48px);
        line-height: 1.45;
    }

    .hero-copy {
        font-size: 15px;
    }

    .hero-mark {
        width: 155px;
    }

    .hero-mark-main {
        font-size: 42px;
    }

    .hero-actions {
        align-items: stretch;
    }

    .button-primary,
    .button-secondary {
        flex: 1 1 150px;
    }

    .home-section {
        padding: 60px 0;
    }

    .featured-regions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .featured-region {
        min-height: 128px;
        padding: 18px;
    }

    .featured-region strong {
        font-size: 23px;
    }

    .featured-region em {
        right: 16px;
        bottom: 15px;
    }

    .map-layout {
        display: block;
    }

    .taiwan-map-frame {
        width: min(100%, 330px);
        margin-inline: auto;
    }

    .map-region-panel {
        padding: 30px 0 0;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category-card {
        min-height: 130px;
        padding: 18px;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 420px) {

    .featured-regions,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .featured-region {
        min-height: 115px;
    }
}


/* === TaiwanLabo2026 v0.3 Phase 3A === */

/*
 * Desktop finishing pass.
 * Preserve the Phase 2 visual direction and improve only
 * hero line breaking, cards and map interaction.
 */

/* Hero: keep the intended Japanese headline on two lines. */

@media (min-width: 901px) {

    .hero-inner {
        grid-template-columns:
            minmax(0, 1.55fr)
            minmax(250px, .65fr);
        gap: clamp(42px, 5vw, 76px);
    }

    .hero-copy-block {
        max-width: 820px;
    }

    .hero h1 {
        max-width: 820px;
        font-size: clamp(38px, 4.6vw, 64px);
        white-space: nowrap;
    }
}

/* Region cards: subtle editorial finish. */

.featured-region {
    border-color: rgba(234, 216, 200, .82);
}

.featured-region::after {
    content: "";
    position: absolute;
    left: 24px;
    bottom: 20px;
    width: 28px;
    height: 1px;
    background: var(--accent);
    opacity: .28;
    transition:
        width .2s ease,
        opacity .2s ease;
}

.featured-region:hover::after {
    width: 42px;
    opacity: .7;
}

.featured-region:hover span {
    color: var(--accent-dark);
}

.featured-region strong {
    letter-spacing: .03em;
}

/* Taiwan map: retain current size, improve cohesion. */

.taiwan-map-frame {
    overflow: hidden;
    border-color: rgba(234, 216, 200, .55);
    background: rgba(255, 255, 255, .58);
}

.map-region-panel {
    padding-left: clamp(20px, 2.5vw, 38px);
}

.region-links a {
    color: var(--ink);
    transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.region-links a:hover,
.region-links a:focus-visible {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.region-links a:focus-visible {
    outline: 2px solid var(--jade);
    outline-offset: 3px;
}

/* Slightly strengthen the PC navigation without making it heavy. */

@media (min-width: 901px) {

    .primary-nav a {
        position: relative;
    }

    .primary-nav a::after {
        content: "";
        position: absolute;
        left: 50%;
        right: 50%;
        bottom: -7px;
        height: 1px;
        background: var(--accent);
        transition:
            left .18s ease,
            right .18s ease;
    }

    .primary-nav a:hover::after,
    .primary-nav a:focus-visible::after {
        left: 0;
        right: 0;
    }
}

/*
 * At narrower desktop widths, release nowrap before the
 * tablet layout begins. This avoids horizontal overflow.
 */

@media (min-width: 901px) and (max-width: 1180px) {

    .hero h1 {
        font-size: clamp(38px, 4.3vw, 54px);
    }
}

/* Mobile/tablet keep natural wrapping. */

@media (max-width: 900px) {

    .hero h1 {
        white-space: normal;
    }

    .featured-region::after {
        left: 18px;
        bottom: 15px;
    }

    .map-region-panel {
        padding-left: 0;
    }
}


/* === TaiwanLabo2026 v0.3 Phase 3B === */

/* Mobile menu: CSS + native details/summary, no JavaScript. */

.mobile-menu {
    display: none;
}

@media (max-width: 900px) {

    .header-inner {
        position: relative;
    }

    .mobile-menu {
        display: block;
        margin-left: 8px;
    }

    .mobile-menu summary {
        width: 54px;
        height: 42px;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--ink);
        background: transparent;
        border: 0;
        cursor: pointer;
        list-style: none;
        user-select: none;
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu-label {
        color: var(--muted);
        font-size: 8px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: .12em;
    }

    .mobile-menu-icon {
        width: 22px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-menu-icon i {
        display: block;
        width: 100%;
        height: 1px;
        background: var(--ink);
        transform-origin: center;
        transition:
            transform .18s ease,
            opacity .18s ease;
    }

    .mobile-menu[open] .mobile-menu-icon i:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

    .mobile-menu[open] .mobile-menu-icon i:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu[open] .mobile-menu-icon i:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }

    .mobile-menu-panel {
        position: absolute;
        z-index: 1000;
        top: 100%;
        left: 0;
        right: 0;
        padding: 18px 22px 24px;
        background: rgba(255, 250, 246, .98);
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 35px rgba(64, 57, 55, .09);
    }

    .mobile-menu-panel nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .mobile-menu-panel nav a {
        min-height: 68px;
        padding: 15px 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        color: var(--ink);
        border-bottom: 1px solid var(--line);
        text-decoration: none;
        font-family:
            "Yu Mincho",
            "Hiragino Mincho ProN",
            Georgia,
            serif;
        font-size: 16px;
    }

    .mobile-menu-panel nav a:nth-child(odd) {
        border-right: 1px solid var(--line);
    }

    .mobile-menu-panel nav a span {
        margin-bottom: 4px;
        color: var(--jade);
        font-family:
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            sans-serif;
        font-size: 8px;
        font-weight: 700;
        letter-spacing: .14em;
    }

    .mobile-menu-panel nav a:hover,
    .mobile-menu-panel nav a:focus-visible {
        color: var(--accent-dark);
        background: rgba(182, 94, 114, .045);
    }

    .mobile-menu-search {
        display: block;
        margin-top: 18px;
        color: var(--accent-dark);
        font-size: 12px;
        text-align: right;
        text-decoration: none;
    }
}

@media (max-width: 480px) {

    .header-search {
        display: none;
    }

    .mobile-menu {
        margin-left: auto;
    }

    .mobile-menu-panel {
        padding-inline: 18px;
    }
}


/* === TaiwanLabo2026 v0.3 Phase 3C === */

/*
 * Mobile finishing:
 * - improve hero headline wrapping
 * - hide legacy scroll buttons where they obstruct content
 */

@media (max-width: 680px) {

    .hero h1 {
        font-size: clamp(30px, 9.2vw, 39px);
        line-height: 1.55;
        letter-spacing: .01em;
    }

    .page-scroll-buttons {
        display: none !important;
    }
}

@media (max-width: 390px) {

    .hero h1 {
        font-size: clamp(28px, 8.8vw, 35px);
    }
}

/* === TaiwanLabo2026 v0.3 Phase 3C final hero fix === */

/* Keep the mobile hero's second phrase together. */
@media (max-width: 680px) {
    .hero h1 {
        font-size: clamp(28px, 8.4vw, 36px);
        letter-spacing: 0;
    }
}

@media (max-width: 390px) {
    .hero h1 {
        font-size: clamp(27px, 8.1vw, 33px);
    }
}


/* =========================================================
   TaiwanLabo2026 v0.4 Article Sidebar Polish
   ========================================================= */

.site-sidebar {
    color: #403937;
}

/* Sidebar panels */
.site-sidebar .widget {
    margin: 0 0 26px;
    padding: 25px 24px;
    background: rgba(255, 250, 246, .76);
    border: 1px solid rgba(182, 94, 114, .10);
    border-radius: 20px;
}

/* Widget headings */
.site-sidebar .widget-title,
.site-sidebar h2,
.site-sidebar h3 {
    margin: 0 0 17px;
    padding: 0 0 11px;
    border-bottom: 1px solid rgba(182, 94, 114, .20);
    color: #403937;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .04em;
}

/* Category / archive style lists */
.site-sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-sidebar li {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(64, 57, 55, .08);
}

.site-sidebar li:last-child {
    border-bottom: 0;
}

.site-sidebar li > a {
    position: relative;
    display: block;
    padding: 9px 18px 9px 2px;
    color: #7d3f50;
    font-size: 14px;
    line-height: 1.55;
    text-decoration: none;
    transition:
        color .18s ease,
        padding-left .18s ease;
}

.site-sidebar li > a::after {
    content: "›";
    position: absolute;
    top: 50%;
    right: 2px;
    color: rgba(182, 94, 114, .52);
    font-size: 17px;
    font-weight: 400;
    transform: translateY(-52%);
}

.site-sidebar li > a:hover,
.site-sidebar li > a:focus-visible {
    padding-left: 6px;
    color: #b65e72;
}

/* Search */
.site-sidebar .search-form {
    display: flex;
    gap: 8px;
}

.site-sidebar .search-field {
    min-width: 0;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid rgba(100, 138, 121, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .55);
    color: #403937;
    font: inherit;
}

.site-sidebar .search-field:focus {
    outline: 2px solid rgba(182, 94, 114, .16);
    border-color: rgba(182, 94, 114, .38);
}

.site-sidebar .search-submit {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: #b65e72;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform .18s ease,
        opacity .18s ease;
}

.site-sidebar .search-submit:hover {
    transform: translateY(-1px);
    opacity: .90;
}

/* Keep nested category lists readable */
.site-sidebar li ul {
    margin: 0 0 6px 10px;
}

.site-sidebar li ul li > a {
    padding-left: 8px;
    font-size: 13px;
}

/* Mobile */
@media (max-width: 900px) {
    .site-sidebar {
        margin-top: 44px;
    }

    .site-sidebar .widget {
        padding: 22px 20px;
        border-radius: 18px;
    }
}



/* =========================================================
   TaiwanLabo2026 v0.4 Comment Form Polish
   ========================================================= */

.comments-area {
    margin-top: 46px;
    padding: 30px 32px 32px;
    background: rgba(255, 250, 246, .72);
    border: 1px solid rgba(182, 94, 114, .10);
    border-radius: 22px;
}

.comments-area .comments-title,
.comments-area .comment-reply-title {
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(182, 94, 114, .18);
    color: #403937;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .04em;
}

.comments-area .logged-in-as,
.comments-area .comment-notes {
    margin: 0 0 22px;
    color: rgba(64, 57, 55, .72);
    font-size: 14px;
    line-height: 1.8;
}

.comments-area a {
    color: #a94f66;
}

.comments-area .comment-form p {
    margin: 0 0 18px;
}

.comments-area .comment-form label {
    display: block;
    margin-bottom: 7px;
    color: #403937;
    font-size: 14px;
    font-weight: 600;
}

.comments-area textarea,
.comments-area input[type="text"],
.comments-area input[type="email"],
.comments-area input[type="url"] {
    box-sizing: border-box;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid rgba(100, 138, 121, .20);
    border-radius: 13px;
    background: rgba(255, 255, 255, .68);
    color: #403937;
    font: inherit;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.comments-area textarea {
    min-height: 150px;
    resize: vertical;
}

.comments-area textarea:focus,
.comments-area input[type="text"]:focus,
.comments-area input[type="email"]:focus,
.comments-area input[type="url"]:focus {
    outline: none;
    border-color: rgba(182, 94, 114, .48);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(182, 94, 114, .10);
}

/* WordPress subscription / consent checkboxes */
.comments-area .comment-form-cookies-consent,
.comments-area .comment-subscription-form {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: rgba(64, 57, 55, .78);
    font-size: 14px;
    line-height: 1.6;
}

.comments-area input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: .25em 0 0;
    accent-color: #b65e72;
}

.comments-area .comment-form-cookies-consent label,
.comments-area .comment-subscription-form label {
    display: inline;
    margin: 0;
    font-weight: 400;
}

/* Submit */
.comments-area .form-submit {
    margin-top: 24px;
}

.comments-area input[type="submit"],
.comments-area .submit {
    appearance: none;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    background: #b65e72;
    color: #fff;
    font: inherit;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        opacity .18s ease;
}

.comments-area input[type="submit"]:hover,
.comments-area .submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(182, 94, 114, .18);
    opacity: .94;
}

/* Existing comments */
.comments-area .comment-list {
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.comments-area .comment-body {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(64, 57, 55, .08);
    border-radius: 15px;
    background: rgba(255, 255, 255, .45);
}

/* Mobile */
@media (max-width: 680px) {
    .comments-area {
        margin-top: 36px;
        padding: 23px 19px 25px;
        border-radius: 18px;
    }

    .comments-area .comments-title,
    .comments-area .comment-reply-title {
        font-size: 18px;
    }

    .comments-area textarea {
        min-height: 130px;
    }
}


/* =========================================================
   TaiwanLabo2026 v0.4.1
   Floral Hero
   ========================================================= */

.hero {
    position: relative;
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.10)
        ),
        url("assets/images/taiwan-floral-hero.png") center center / cover no-repeat;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

/* Keep copy readable over the floral background */
.hero-copy-block {
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.30);
}

/* Preserve the soft paper-like Taiwan seal */
.hero-mark {
    background: rgba(255, 250, 246, 0.90);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Mobile: favor the quieter center of the floral artwork */
@media (max-width: 680px) {
    .hero {
        background-position: center center;
    }

    .hero-mark {
        background: rgba(255, 250, 246, 0.92);
    }
}


/* v0.4.1 hero copy readability */
.hero-copy {
    display: inline-block;
    padding: 10px 14px;
    margin-left: -14px;
    border-radius: 10px;
    background: rgba(255, 250, 246, 0.42);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

@media (max-width: 680px) {
    .hero-copy {
        margin-left: -10px;
        padding: 9px 10px;
        background: rgba(255, 250, 246, 0.56);
    }
}

/* =========================================================
   TaiwanLabo2026 v0.4.1
   Article ranking links
   ========================================================= */

.article-ranking-links {
    margin: 34px 0;
    padding: 20px 22px;
    border: 1px solid rgba(182, 94, 114, 0.16);
    border-radius: 16px;
    background: rgba(255, 250, 246, 0.72);
}

.article-ranking-label {
    margin: 0 0 12px;
    color: #648a79;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.article-ranking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-ranking-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 18px;
    border: 1px solid #b65e72;
    border-radius: 999px;
    color: #7d3f50;
    background: #fffaf6;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
}

.article-ranking-actions a:hover,
.article-ranking-actions a:focus-visible {
    background: #f7e8e9;
    transform: translateY(-1px);
}

@media (max-width: 680px) {
    .article-ranking-links {
        padding: 18px;
    }

    .article-ranking-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .article-ranking-actions a {
        width: 100%;
    }
}

