/*
Theme Name: Long Lifestyle Hong Kong
Description: 香港吃喝玩樂資訊站，涵蓋美食、活動、展覽、生活潮玩、美妝時尚及優惠。
Version: 1.4.10
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: long-lifestyle
*/

@font-face {
    font-family: "Instrument Serif";
    src: url("assets/instrument-serif.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --paper: #f9f8f5;
    --ink: #20211e;
    --muted-ink: #595b54;
    --rule: #d7d7ce;
    --newsprint: #efefe9;
    --accent: #516352;
    --body: "Source Han Sans HC", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
    --headline: "Instrument Serif", "Noto Serif HK", "Songti TC", "PMingLiU", serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.65 var(--body);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img, video, iframe { max-inline-size: 100%; }
img, video { block-size: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 {
    font-family: var(--headline);
    font-weight: 400;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.edition { width: min(100% - 96px, 1248px); margin-inline: auto; }
.skip-link {
    position: absolute;
    z-index: 2;
    padding: .6rem 1rem;
    background: var(--paper);
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.masthead {
    position: relative;
    display: grid;
    justify-items: center;
    padding: 23px 0 20px;
}
.masthead a { max-inline-size: 100%; }
.masthead > a img {
    display: block;
    inline-size: auto;
    block-size: 114px;
    object-fit: contain;
}
.site-search {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: 20px;
    display: flex;
    inline-size: 210px;
    align-items: center;
    border-bottom: 1px solid var(--rule);
}
.site-search input, .site-search button {
    font: inherit;
    color: var(--ink);
    background: transparent;
    border: 0;
}
.site-search input { min-width: 0; inline-size: 100%; padding: 7px; font-size: .875rem; }
.site-search button { flex: 0 0 40px; display: grid; place-items: center; block-size: 40px; cursor: pointer; }
.category-nav { border-block: 1px solid var(--rule); }
.category-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: clamp(14px, 3.65vw, 55px);
    padding: 0;
    margin: 0;
    list-style: none;
}
.category-nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 49px;
    padding-inline: 4px;
    color: var(--muted-ink);
    text-decoration: none;
    font-size: .875rem;
}
.category-nav a:hover, .category-nav a[aria-current] { color: var(--ink); }
.category-nav a[aria-current]::after {
    position: absolute;
    content: "";
    inset: auto 4px -1px;
    border-bottom: 2px solid var(--ink);
}

.publication { padding-block: 34px 78px; }
.featured-stories__viewport { overflow: hidden; }
.featured-stories:not([data-carousel-ready]) .lead-story + .lead-story { display: none; }
[data-carousel-ready] .featured-stories__track { display: flex; touch-action: pan-y pinch-zoom; }
[data-carousel-ready] .featured-stories__track > .lead-story { flex: 0 0 100%; min-width: 0; }
.featured-stories__controls:not([hidden]) { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 8px; }
.featured-stories__dots { grid-column: 2; display: flex; justify-content: center; }
.featured-stories__controls button {
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted-ink);
    cursor: pointer;
}
.featured-stories__controls button:focus-visible { outline-offset: -4px; }
.featured-stories__dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border: 1px solid currentColor;
    border-radius: 50%;
}
.featured-stories__dot:hover, .featured-stories__dot[aria-current] { color: var(--ink); }
.featured-stories__dot[aria-current]::before { background: currentColor; }
.featured-stories__toggle { justify-self: end; }
.featured-stories__toggle:hover { background: var(--newsprint); }
.lead-story {
    display: grid;
    grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr);
    min-height: 412px;
}
.lead-story--text { grid-template-columns: minmax(0, 1fr); min-height: 320px; }
.lead-story__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 25px 56px 25px 0;
}
.lead-story__image { display: block; position: relative; min-height: 100%; }
.lead-story__image > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-category, .story-date {
    font-size: .8125rem;
    line-height: 1.45;
    color: var(--muted-ink);
}
.story-category { color: var(--accent); letter-spacing: .08em; }
.story-category a { text-decoration: none; }
.story-category a:hover { text-decoration: underline; }
.story-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.story-meta--center { justify-content: center; }
.story-meta:empty { display: none; }
.story-type {
    padding-inline-end: 8px;
    border-inline-end: 1px solid var(--rule);
    font-size: .75rem;
}
.story-type--video { color: #936360; }
.story-type--article { color: #536a78; }
.story-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 9px 0 0;
    padding: 0;
    list-style: none;
    font-size: .75rem;
    color: var(--muted-ink);
}
.story-keywords--center { justify-content: center; margin: 0 0 12px; }
.story-keywords li {
    max-inline-size: 100%;
    padding: 2px 6px;
    background: var(--newsprint);
    overflow-wrap: anywhere;
}
.story-video-mark {
    position: absolute;
    inset: auto auto 10px 10px;
    display: grid;
    place-items: center;
    inline-size: 34px;
    block-size: 34px;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 50%;
    background: rgb(0 0 0 / 70%);
}
.story-video-mark img { display: block; filter: invert(1); }
.story-location {
    display: inline-block;
    max-inline-size: 100%;
    padding: 2px 9px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--muted-ink);
    font-size: .75rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.lead-story h2 {
    margin-top: 14px;
    font-size: 3rem;
    line-height: 1.24;
    text-wrap: balance;
}
.lead-story h2 a, .story-card h2 a, .story-card h3 a { text-decoration: none; }
.lead-story__excerpt {
    margin-top: 20px;
    max-width: 38ch;
    color: var(--muted-ink);
    font-size: .9375rem;
    text-wrap: pretty;
}
.lead-story__read {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    border-bottom: 1px solid currentColor;
    min-height: 36px;
    color: var(--ink);
    text-decoration: none;
    font-size: .875rem;
}
.lead-story__read span { font-size: 1.15em; }
.section-heading {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 48px 0 22px;
    font-size: 2.1rem;
}
.section-heading::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.stories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 28px;
}
.story-card { border-bottom: 1px solid var(--rule); padding-bottom: 21px; }
.story-card__image { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--newsprint); }
.story-card__image > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-card__copy { padding-top: 16px; }
.story-card h2, .story-card h3 {
    margin-top: 9px;
    font-size: 1.65rem;
    text-wrap: balance;
}
.archive-heading { margin: 0 0 27px; font-size: 3.4rem; }
.empty-state { color: var(--muted-ink); padding-block: 30px 65px; }
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 12px; }
.pagination .page-numbers { padding: .35rem .75rem; }
.pagination .current { border-bottom: 1px solid var(--ink); }

.article-header {
    max-width: 920px;
    margin: 12px auto 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
    text-align: center;
}
.article-header h1 { margin: 12px 0 15px; font-size: 3.6rem; line-height: 1.2; text-wrap: balance; }
.story-byline { margin: 5px 0 0; color: var(--muted-ink); font-size: .875rem; overflow-wrap: anywhere; }
.article-sharing {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 18px;
    margin-top: 12px;
}
.article-sharing a, .article-sharing button:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: .875rem;
    cursor: pointer;
}
.article-sharing a, .article-sharing button:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-sharing__status {
    flex-basis: 100%;
    min-height: 1.25rem;
    color: var(--muted-ink);
    font-size: .75rem;
}
.article-body {
    max-width: 760px;
    margin-inline: auto;
    line-height: 1.85;
    overflow-wrap: anywhere;
}
.article-body > * + * { margin-top: 1.2em; }
.article-body h2, .article-body h3 { margin-top: 1.45em; }
.article-body img, .article-body video { vertical-align: middle; }
.article-body img { object-fit: contain; }
.article-body p video, .article-body > video { width: 100%; }
.article-videos { display: grid; gap: 20px; }
.article-videos video { display: block; max-height: min(70vh, 640px); margin-inline: auto; object-fit: contain; }
.article-body figcaption { color: var(--muted-ink); font-size: .85rem; }
.article-body blockquote { margin-inline: 0; padding-inline-start: 18px; border-inline-start: 1px solid var(--accent); }
.article-body pre, .article-body .wp-block-table { overflow-x: auto; }
.article-body table { border-collapse: collapse; }
.article-body td, .article-body th { padding: .4rem .65rem; border: 1px solid var(--rule); }
.article-comments {
    max-width: 760px;
    margin: 48px auto 0;
    padding-top: 22px;
    border-top: 1px solid var(--rule);
    overflow-wrap: anywhere;
}
.article-comments h2 { font-size: 1.4rem; margin-bottom: 16px; }
.article-comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.article-comment-list .comment-body { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.article-comment-list .comment-meta { color: var(--muted-ink); font-size: .85rem; margin-bottom: 4px; }
.article-comments .comment-status { margin-bottom: 12px; color: var(--accent); }
.article-comments textarea {
    display: block;
    width: 100%;
    min-height: 100px;
    resize: vertical;
    padding: 12px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink);
    font: inherit;
}
.article-comments .submit {
    margin-top: 12px;
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font: inherit;
    cursor: pointer;
}
.article-related {
    max-width: 760px;
    margin-inline: auto;
    overflow-wrap: anywhere;
}
.article-related .story-card h3 { font-size: 1.2rem; }
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px 30px;
    flex-wrap: wrap;
    border-top: 1px solid var(--rule);
    padding: 23px 0 28px;
}
.footer__identity { display: grid; gap: 4px; }
.footer__brand { font: 400 1.55rem/1.15 "Instrument Serif", Georgia, serif; text-decoration: none; }
.footer small { color: var(--muted-ink); font-size: .75rem; }
.footer__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    font-size: .875rem;
    font-style: normal;
}
.footer__contact-label { padding-inline-end: 12px; border-inline-end: 1px solid var(--rule); }
.footer__contact-links { display: flex; align-items: center; }
.footer__contact-icon {
    display: inline-grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
}
a.footer__contact-icon:hover { background: var(--newsprint); }
.footer__contact-icon--inactive { opacity: .36; }
.footer__contact-icon img { display: block; inline-size: 19px; block-size: 19px; }
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 880px) {
    .edition { width: calc(100% - 56px); }
    .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .lead-story { min-height: 350px; }
    .lead-story__copy { padding-right: 30px; }
    .lead-story h2 { font-size: 2.25rem; }
}
@media (max-width: 640px) {
    .edition { width: calc(100% - 36px); }
    .masthead { padding: 16px 0 15px; }
    .masthead > a img { block-size: 90px; }
    .site-search { position: static; inline-size: 100%; margin-top: 10px; }
    .category-nav ul { column-gap: 0; }
    .category-nav li { flex: 1 1 33.333%; }
    .category-nav li:nth-child(-n + 4) { flex-basis: 22%; }
    .category-nav li:nth-child(2) { flex-basis: 34%; }
    .category-nav a { justify-content: center; min-height: 44px; padding-inline: 2px; font-size: .8125rem; text-align: center; }
    .category-nav a[aria-current]::after { inset-inline: 3px; }
    .publication { padding-block: 20px 48px; }
    .lead-story { grid-template-columns: minmax(0, 1fr); min-height: auto; }
    .lead-story__copy { padding: 20px 0 4px; }
    .lead-story h2 { inline-size: 100%; font-size: 2.15rem; text-wrap: wrap; }
    .lead-story__image { grid-row: 1; inline-size: 100%; min-height: 0; aspect-ratio: 3 / 2; }
    .lead-story__excerpt { inline-size: 100%; max-width: none; margin-top: 13px; }
    .lead-story__read { margin-top: 15px; }
    .section-heading { margin-top: 30px; font-size: 1.65rem; }
    .stories { gap: 20px 15px; }
    .story-card h2, .story-card h3 { font-size: 1.25rem; }
    .story-meta { column-gap: 8px; }
    .article-header { margin-top: 8px; }
    .article-header h1, .archive-heading { font-size: 2.2rem; }
}
