/*
Theme Name: HotelPicks Main
Theme URI: https://hotelpicks.jp
Author: HotelPicks
Author URI: https://hotelpicks.jp
Description: Japanese Minimal theme for HotelPicks — curated hotel recommendations.
Version: 0.1.0
License: Proprietary
Text Domain: hotelpicks
*/

/* ---------- Reset / Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

:root {
    --bg:        #fafafa;
    --bg-alt:    #f4f1ea;
    --kinari:    #e8e0d3;
    --kinari-d:  #d4cebf;
    --text:      #1d1d1d;
    --text-mid:  #555;
    --text-low:  #999;
    --ai:        #25405a;  /* 藍 indigo */
    --ai-light:  #4a6580;
    --line:      #d4cebf;
    --max:       1120px;
}

body {
    background: var(--bg); color: var(--text);
    font-family: 'Noto Sans JP', -apple-system, 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif;
    font-weight: 300; line-height: 1.85;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--ai); }

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

.serif { font-family: 'Shippori Mincho', 'Noto Serif JP', serif; }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Header (slim, auto-hide on scroll-down) ---------- */
.site-header {
    padding: 14px 0; border-bottom: 1px solid var(--line);
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(250,250,250,0.94);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    transform: translateY(0);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1), padding 0.2s, box-shadow 0.2s;
    will-change: transform;
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header.is-scrolled { padding: 8px 0; box-shadow: 0 1px 12px rgba(0,0,0,0.06); }
body { padding-top: 78px; }   /* offset for fixed header */

.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px 24px;
}
.brand {
    display: inline-flex; align-items: center;
    text-decoration: none; color: var(--text);
    flex-shrink: 0;
}
.brand-logo {
    height: 36px; width: auto; display: block;
    flex-shrink: 0; max-width: 100%;
}
@media (max-width: 1024px) {
    .site-header { padding: 12px 0; }
    body { padding-top: 64px; }
    .brand-logo { height: 32px; }
}
@media (max-width: 640px) {
    .site-header { padding: 10px 0; }
    body { padding-top: 58px; }
    .brand-logo { height: 28px; }
    .main-nav { gap: 16px; font-size: 11px; }
    .main-nav a { letter-spacing: 0.08em; }
}
.screen-reader-text {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0); border: 0;
}
.main-nav {
    display: flex; gap: 32px; font-size: 12px; font-weight: 400;
    color: var(--text);
}
.main-nav a { letter-spacing: 0.1em; }
.main-nav a:hover { color: var(--ai); }

/* ---------- Hero ---------- */
.hero {
    padding: 60px 0 80px;
}
.hero-img {
    height: 420px; margin-bottom: 36px; background: var(--kinari);
    background-image: linear-gradient(180deg, rgba(232,224,211,0.4) 0%, rgba(74,90,107,0.7) 100%);
    position: relative; overflow: hidden;
}
.hero-img-cap {
    position: absolute; top: 18px; left: 18px; color: var(--bg);
    font-size: 10px; letter-spacing: 0.4em;
}
.hero-issue {
    font-size: 10px; letter-spacing: 0.4em; color: var(--ai);
    font-weight: 500; margin-bottom: 14px; text-transform: uppercase;
}
.hero-title {
    font-family: 'Shippori Mincho', serif; font-size: 38px;
    font-weight: 400; line-height: 1.5; letter-spacing: 0.05em;
    margin-bottom: 18px;
}
.hero-dek {
    font-size: 14px; color: var(--text-mid); line-height: 1.9;
    margin-bottom: 24px; max-width: 600px;
}
.hero-meta {
    padding-top: 18px; border-top: 1px solid var(--line);
    display: flex; align-items: baseline; gap: 24px;
    font-size: 11px; color: var(--text-low); letter-spacing: 0.2em;
}
.hero-score {
    font-family: 'Shippori Mincho', serif; font-size: 24px;
    font-weight: 500; color: var(--ai); letter-spacing: 0;
}

/* ---------- Section heading ---------- */
.section-heading {
    margin: 50px 0 30px;
    display: flex; align-items: baseline; justify-content: space-between;
    border-bottom: 1px solid var(--line); padding-bottom: 14px;
}
.section-heading h2 {
    font-family: 'Shippori Mincho', serif; font-size: 20px;
    font-weight: 500; letter-spacing: 0.1em;
}
.section-heading .more {
    font-size: 11px; letter-spacing: 0.2em; color: var(--text-low);
}

/* ---------- Article cards ---------- */
.cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
    margin-bottom: 60px;
}
@media (max-width: 800px) { .cards { grid-template-columns: 1fr; gap: 28px; } }

.card { text-decoration: none; color: inherit; display: block; }
.card-img {
    height: 200px; background: var(--kinari);
    background-image: linear-gradient(180deg, #e8e0d3, #a89c87);
    margin-bottom: 16px; transition: opacity .2s;
}
.card:hover .card-img { opacity: 0.85; }
.card-cat {
    font-size: 10px; letter-spacing: 0.3em; color: var(--ai);
    font-weight: 500; margin-bottom: 12px; text-transform: uppercase;
}
.card-title {
    font-family: 'Shippori Mincho', serif; font-size: 17px;
    font-weight: 400; line-height: 1.6; letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.card-dek {
    font-size: 12px; color: var(--text-mid); line-height: 1.8;
    margin-bottom: 14px;
}
.card-bottom {
    padding-top: 12px; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: baseline;
}
.card-score {
    font-family: 'Shippori Mincho', serif; font-size: 22px;
    font-weight: 500; color: var(--ai);
}
.card-score-l {
    font-size: 9px; letter-spacing: 0.3em; color: var(--text-low);
    text-transform: uppercase;
}

/* ---------- Single article ---------- */
.article-header {
    padding: 60px 0 30px; text-align: center;
    border-bottom: 1px solid var(--line); margin-bottom: 40px;
}
.article-cat {
    font-size: 10px; letter-spacing: 0.4em; color: var(--ai);
    font-weight: 500; margin-bottom: 18px;
}
.article-title {
    font-family: 'Shippori Mincho', serif; font-size: 36px;
    font-weight: 400; line-height: 1.5; letter-spacing: 0.05em;
    max-width: 800px; margin: 0 auto 18px;
}
.article-dek {
    font-size: 14px; color: var(--text-mid); line-height: 1.9;
    max-width: 640px; margin: 0 auto 24px;
}
.article-meta {
    display: inline-flex; align-items: baseline; gap: 24px;
    padding: 14px 0; border-top: 1px solid var(--line);
    font-size: 11px; color: var(--text-low); letter-spacing: 0.2em;
}
.article-body {
    max-width: 720px; margin: 0 auto; padding: 30px 0 60px;
    font-size: 15px; line-height: 2;
}
.article-body p { margin-bottom: 1.4em; }
.article-body h2 {
    font-family: 'Shippori Mincho', serif; font-size: 22px;
    font-weight: 500; letter-spacing: 0.05em; margin: 2em 0 0.8em;
    padding-top: 0.8em; border-top: 1px solid var(--line);
}
.article-body h3 {
    font-family: 'Shippori Mincho', serif; font-size: 17px;
    font-weight: 500; margin: 1.6em 0 0.6em;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 80px; padding: 50px 0 40px;
    background: var(--bg-alt); border-top: 1px solid var(--line);
    font-size: 12px; color: var(--text-mid); line-height: 1.9;
}
.site-footer .container {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
@media (max-width: 700px) { .site-footer .container { grid-template-columns: 1fr; } }
.footer-brand {
    font-family: 'Shippori Mincho', serif; font-size: 16px;
    font-weight: 500; letter-spacing: 0.15em; margin-bottom: 14px;
}
.footer-attrib {
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
    font-size: 11px; color: var(--text-low); letter-spacing: 0.1em;
}
.footer-col h4 {
    font-family: 'Shippori Mincho', serif; font-size: 12px;
    font-weight: 500; letter-spacing: 0.2em;
    margin-bottom: 12px; color: var(--text);
}
.footer-col a { display: block; padding: 4px 0; color: var(--text-mid); font-size: 12px; }
.footer-bottom {
    text-align: center; padding-top: 30px; margin-top: 30px;
    border-top: 1px solid var(--line); font-size: 11px;
    color: var(--text-low); letter-spacing: 0.15em;
}

/* ---------- Placeholder (Phase 1) ---------- */
.placeholder {
    text-align: center; padding: 100px 28px 120px;
}
.placeholder .marker {
    font-size: 10px; letter-spacing: 0.5em; color: var(--ai);
    font-weight: 500; margin-bottom: 24px;
}
.placeholder h1 {
    font-family: 'Shippori Mincho', serif; font-size: 32px;
    font-weight: 400; letter-spacing: 0.08em; line-height: 1.6;
    margin-bottom: 20px;
}
.placeholder p {
    font-size: 14px; color: var(--text-mid); line-height: 2;
    max-width: 520px; margin: 0 auto 14px;
}
.placeholder .hr {
    width: 60px; height: 1px; background: var(--line); margin: 30px auto;
}
.placeholder .related {
    font-size: 12px; color: var(--text-low); letter-spacing: 0.1em;
}
.placeholder .related a { color: var(--ai); }

/* =====================================================
   Engagement components (added 2026-05-13)
   ===================================================== */

/* Reading progress bar */
.reading-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    z-index: 99; background: transparent; pointer-events: none;
}
.reading-progress span {
    display: block; height: 100%; background: var(--ai);
    transform-origin: left; transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
    .reading-progress span {
        animation: hp-progress linear forwards;
        animation-timeline: scroll(root);
    }
    @keyframes hp-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Breadcrumb */
.breadcrumb { font-size: 11px; color: var(--text-low); margin: 28px 0 8px; letter-spacing: 0.05em; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: '›'; padding-right: 6px; color: var(--text-low); }
.breadcrumb a { color: var(--text-mid); }
.breadcrumb a:hover { color: var(--ai); }
.breadcrumb li[aria-current] { color: var(--text); }

/* Article meta — reading time + updated badge */
.meta-time { color: var(--text-low); font-size: 11px; letter-spacing: 0.05em; }
.updated-badge {
    display: inline-block; padding: 2px 8px; font-size: 10px;
    background: #f4ecdf; color: var(--ai); border-radius: 3px;
    letter-spacing: 0.05em; margin-left: 6px;
}

/* Article narrow column */
.article-narrow { max-width: 760px; }

/* Article hero image */
.article-hero { max-width: 960px; margin: 0 auto 40px; }

/* ============ HotelPicks comparison table (.hp-compare) ============
   The 7-column table must escape .article-narrow's 760 px so Japanese
   text doesn't get squashed. We keep the table's natural display
   (display:table) — earlier attempts that flipped to display:block
   broke the row/cell semantics. Instead we use a positioning trick
   to break out of the narrow column while keeping the table intact. */

.article-body .hp-compare {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    /* expand to viewport width (minus side gutter) up to the container cap */
    width: min(calc(100vw - 56px), 1120px);
    margin-top: 18px;
    margin-bottom: 28px;
    border-collapse: collapse;
    line-height: 1.6;
    /* Use auto layout so the long "1行特徴" cell can absorb leftover width */
    table-layout: auto;
}
.article-body .hp-compare th,
.article-body .hp-compare td {
    padding: 10px 12px;
    white-space: nowrap;        /* short columns stay on one line */
    vertical-align: top;
}
.article-body .hp-compare td:last-child,
.article-body .hp-compare th:last-child {
    /* the "1行特徴" cell must wrap when needed */
    white-space: normal;
    min-width: 240px;
    max-width: 360px;
}

@media (max-width: 760px) {
    /* On phones the breakout trick yields nothing — fall back to natural
       width inside the narrow column with a smaller font. */
    .article-body .hp-compare {
        position: static;
        left: auto;
        transform: none;
        width: 100%;
        font-size: 11px;
    }
    .article-body .hp-compare th,
    .article-body .hp-compare td {
        padding: 6px 6px;
    }
}

/* Article tags */
.article-tags { margin: 40px 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    display: inline-block; padding: 4px 10px; font-size: 11px;
    background: #f4ecdf; color: var(--ai); border-radius: 999px;
    letter-spacing: 0.05em; text-decoration: none;
}
.tag-chip:hover { background: var(--ai); color: #fff; }

/* Share buttons */
.article-share {
    margin: 28px 0 36px; display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.share-label { font-size: 11px; color: var(--text-low); letter-spacing: 0.1em; margin-right: 6px; }
.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 56px; height: 30px; padding: 0 12px; font-size: 11px;
    border: 1px solid var(--line); background: #fff; color: var(--text);
    border-radius: 4px; text-decoration: none; cursor: pointer;
    letter-spacing: 0.05em; font-family: inherit;
}
.share-btn:hover { background: var(--ai); color: #fff; border-color: var(--ai); }
.share-x:hover  { background: #000; border-color: #000; }
.share-line:hover { background: #06c755; border-color: #06c755; }
.share-fb:hover { background: #1877f2; border-color: #1877f2; }

/* Author card */
.author-card {
    display: flex; gap: 16px; padding: 20px; background: var(--paper, #fbf9f5);
    border-radius: 8px; margin: 24px 0 36px; border: 1px solid var(--line);
}
.author-avatar img, .author-avatar .avatar-img { width: 64px; height: 64px; border-radius: 50%; display: block; }
.author-name-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.author-name { font-family: 'Shippori Mincho', serif; font-size: 15px; }
.author-role { font-size: 10px; letter-spacing: 0.2em; color: var(--text-low); }
.author-bio { font-size: 12px; color: var(--text-mid); line-height: 1.8; margin: 0; }

/* Up Next */
.up-next {
    display: block; padding: 20px 24px; margin: 24px 0;
    border: 1px solid var(--ai); border-radius: 8px; text-decoration: none;
    color: var(--text); transition: background 0.15s;
}
.up-next:hover { background: var(--ai); color: #fff; }
.up-next:hover .up-next-label, .up-next:hover .up-next-meta { color: rgba(255,255,255,0.85); }
.up-next-label { font-size: 10px; letter-spacing: 0.3em; color: var(--ai); margin-bottom: 6px; }
.up-next-title { font-family: 'Shippori Mincho', serif; font-size: 17px; line-height: 1.5; margin-bottom: 4px; }
.up-next-meta { font-size: 11px; color: var(--text-low); letter-spacing: 0.05em; }

/* Related articles section */
.related-section { margin: 48px 0 24px; padding-top: 36px; border-top: 1px solid var(--line); }
.related-heading {
    font-family: 'Shippori Mincho', serif; font-size: 20px; font-weight: 500;
    letter-spacing: 0.08em; margin: 0 0 24px; text-align: center;
}
.related-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.related-card { text-decoration: none; color: var(--text); display: block; }
.related-img {
    aspect-ratio: 4 / 3; background: var(--beige, #f4ecdf);
    background-size: cover; background-position: center;
    margin-bottom: 10px; border-radius: 4px;
}
.related-img-empty { background: linear-gradient(135deg, var(--paper, #fbf9f5), var(--beige, #f4ecdf)); }
.related-cat { font-size: 10px; letter-spacing: 0.2em; color: var(--ai); margin-bottom: 4px; text-transform: uppercase; }
.related-title { font-family: 'Shippori Mincho', serif; font-size: 13px; line-height: 1.55; margin-bottom: 6px; }
.related-score { font-family: 'Shippori Mincho', serif; font-size: 18px; color: var(--ai); }
.related-score span { font-size: 11px; color: var(--text-low); }

@media (max-width: 1024px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .related-grid { grid-template-columns: 1fr; gap: 16px; } }

/* TOC (if easy-table-of-contents plugin activated) */
#toc_container { border: 1px solid var(--line); background: var(--paper, #fbf9f5); padding: 16px 20px; margin: 28px 0; border-radius: 4px; }
#toc_container .toc_title { font-family: 'Shippori Mincho', serif; font-size: 12px; letter-spacing: 0.15em; color: var(--text-mid); margin-bottom: 8px; text-transform: uppercase; }
#toc_container ul { font-size: 13px; }
#toc_container a { color: var(--ai); }

/* ---------- Hub pages (areas / categories) ---------- */
.archive-header { padding: 36px 0 24px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.archive-label { font-size: 10px; letter-spacing: 0.4em; color: var(--ai); font-weight: 500; margin-bottom: 12px; }
.archive-title { font-family: 'Shippori Mincho', serif; font-size: 30px; font-weight: 500; letter-spacing: 0.05em; margin-bottom: 12px; }
.archive-desc { font-size: 13px; color: var(--text-mid); max-width: 620px; line-height: 1.85; }

.hub-grid { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 24px 0 60px; }
.hub-chip {
    display: inline-flex; align-items: baseline; gap: 8px;
    padding: 10px 16px; border: 1px solid var(--line); background: #fff;
    color: var(--text); text-decoration: none; border-radius: 24px;
    transition: background .15s, border-color .15s;
}
.hub-chip:hover { background: var(--ai); border-color: var(--ai); color: #fff; }
.hub-chip-name { font-size: 13px; font-family: 'Shippori Mincho', serif; }
.hub-chip-count { font-size: 10px; color: var(--text-low); letter-spacing: 0.1em; }
.hub-chip:hover .hub-chip-count { color: rgba(255,255,255,0.7); }

.cat-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
    margin: 24px 0 60px;
}
@media (max-width: 640px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
    display: block; padding: 24px 28px; border: 1px solid var(--line);
    background: #fff; color: var(--text); text-decoration: none;
    border-radius: 6px; transition: background .15s, border-color .15s;
}
.cat-card:hover { background: var(--bg-alt); border-color: var(--ai); }
.cat-card-name { font-family: 'Shippori Mincho', serif; font-size: 18px; margin-bottom: 8px; }
.cat-card-count { font-size: 11px; color: var(--ai); letter-spacing: 0.15em; margin-bottom: 10px; }
.cat-card-desc { font-size: 12px; color: var(--text-mid); line-height: 1.8; }

.pager-wrap { text-align: center; margin: 40px 0 80px; }
.pager-wrap .page-numbers {
    display: inline-block; padding: 8px 14px; margin: 0 3px;
    border: 1px solid var(--line); background: #fff;
    font-size: 12px; color: var(--text); text-decoration: none;
}
.pager-wrap .page-numbers.current { background: var(--ai); color: #fff; border-color: var(--ai); }
.pager-wrap .page-numbers:hover:not(.current) { background: var(--bg-alt); }
.empty-hint { text-align: center; padding: 60px 0; color: var(--text-low); font-size: 14px; }

/* ============ /areas/ hub — hierarchical region → prefecture → tag list ============ */
.areas-list { margin-top: 24px; }
.areas-region {
    margin: 36px 0 28px;
    padding-top: 18px;
    border-top: 1px solid #e8e0d3;
}
.areas-region:first-child { border-top: none; padding-top: 0; }
.areas-region-title {
    font-family: 'Shippori Mincho', serif;
    font-size: 22px;
    color: #25405a;
    letter-spacing: 0.04em;
    margin: 0 0 18px;
    font-weight: 500;
}
.areas-pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px 22px;
}
.areas-pref-block {
    padding: 14px 16px;
    background: #faf8f4;
    border-left: 2px solid #25405a;
    border-radius: 0 2px 2px 0;
}
.areas-pref-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 10px;
}
.areas-pref-name {
    font-family: 'Shippori Mincho', serif;
    font-size: 17px; color: #25405a;
    text-decoration: none; font-weight: 500;
}
.areas-pref-name:hover { text-decoration: underline; }
.areas-pref-name-static { color: #6b7280; }
.areas-pref-count {
    font-size: 11px; color: #999;
    letter-spacing: 0.15em; font-variant-numeric: tabular-nums;
}
.areas-sub-tags {
    display: flex; flex-wrap: wrap; gap: 6px 8px;
}
.areas-sub-tags .hub-chip {
    padding: 4px 9px;
    font-size: 11px;
    background: #fff;
    border: 1px solid #e0d6c2;
}
.areas-sub-tags .hub-chip-name { font-size: 11px; }
.areas-sub-tags .hub-chip-count { font-size: 9px; }

.areas-region-uncategorized .hub-grid { gap: 8px 10px; }
