/*
 * なうとれ検索 | Home editorial layout v1.1.3
 * Works with the shared trendhub-single.css shell (header/footer/typography).
 * Homepage-only classes use th-home- to avoid affecting article pages.
 */
body.home {
    background: #fff;
    color: #171c29;
}
body.home .th-container { max-width: 1380px; padding-left: 36px; padding-right: 36px; }
body.home .th-header__inner { height: 54px; }
body.home .th-header .th-brand { font-size: 24px; }
body.home .th-header__tagline { margin-left: 20px; padding-left: 19px; max-width: 158px; white-space: normal; font-size: 10px; line-height: 1.35; border-left: 1px solid #dce0e7; }
body.home .th-nav__list a { padding: 17px 0; font-size: 11px; }
body.home .th-header__actions { margin-left: 36px; }
/* The home masthead participates in normal page flow.
 * A sticky header overlaps the hero as soon as the page is scrolled.
 * Keep article pages' independent header behavior unchanged. */
body.home .th-header {
    position: relative;
    top: auto;
    box-shadow: 0 2px 9px rgba(16,24,40,.035);
}

body.home .th-home { overflow: clip; min-height: 68vh; background: #fff; }
body.home .th-home a { color: inherit; text-decoration: none; }
body.home .th-home a:hover { text-decoration: none; }
body.home .th-home button { cursor: pointer; font-family: inherit; }
body.home .th-home svg { width: 20px; height: 20px; flex: 0 0 auto; }
body.home .th-home *, body.home .th-home *::before, body.home .th-home *::after { box-sizing: border-box; }
body.home .th-home [hidden] { display: none !important; }
body.home .th-home :focus-visible { outline: 3px solid #357ff0; outline-offset: 4px; border-radius: 3px; }
body.home .th-home img { display: block; max-width: 100%; }
/* Keep the first section's spacing inside the content wrapper.
 * flow-root also prevents the first section's top margin from collapsing outward. */
.th-home__inner { display: flow-root; padding-top: 28px; padding-bottom: 20px; }
.th-home__inner > .th-home-section:first-child { margin-top: 0; }

/* Split carousel — photo 64%, editorial copy 36%. */
.th-home-hero { position: relative; width: 100%; isolation: isolate; background: #f6f8fa; }
.th-home-hero__slides { width: 100%; }
/* Avoid a fixed grid height: the headline / excerpt may wrap on real posts.
 * The image is taken out of grid sizing so its intrinsic aspect ratio cannot
 * expand the track beyond the slide and cover the next section. */
.th-home-hero__slide { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(350px, 1fr); min-height: clamp(340px, 26vw, 390px); height: auto; }
/* The visual fills its own grid cell, with no min-content image overflow. */
.th-home-hero__visual { position: relative; isolation: isolate; overflow: hidden; background: #dfe9e7; min-width: 0; min-height: 0; }
/* Absolute positioning means the featured image cannot enlarge the grid row. */
.th-home-hero__image { position: absolute; inset: 0; display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: center top; }
.th-home-hero__visual::after { position: absolute; z-index: 1; inset: 0; content: ''; background: linear-gradient(90deg, rgba(8,24,24,.32) 0%, transparent 63%); pointer-events: none; }
.th-home-hero__overlay-copy { position: absolute; z-index: 2; left: clamp(30px,7.3vw,110px); top: 50%; transform: translateY(-50%) rotate(-9deg); max-width: 36%; margin: 0; color: #fff; text-shadow: 0 2px 11px rgba(0,0,0,.24); font-family: 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif; font-weight: 600; letter-spacing: .10em; font-size: clamp(18px,2.05vw,30px); line-height: 1.75; }
.th-home-hero__content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; min-height: 0; padding: 28px clamp(26px,3.3vw,56px) 76px clamp(26px,2.8vw,47px); background: linear-gradient(110deg,#fff 0%,#f8fafc 100%); }
.th-home-hero__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; color: #8993a4; font-size: 10px; font-weight: 500; }
.th-home-hero__meta a { color: #3085e9 !important; font-weight: 700; }
.th-home-hero__meta time { border-left: 1px solid #dce2e8; padding-left: 11px; }
.th-home-hero__title { font-size: clamp(22px,2.15vw,33px); line-height: 1.51; font-weight: 800; letter-spacing: -.033em; margin: 0 0 12px; max-width: 480px; overflow-wrap: anywhere; }
.th-home-hero__title a:hover { color: #2e78dd !important; }
.th-home-hero__excerpt { max-width: 450px; color: #656e7b; font-size: 12px; line-height: 1.8; font-weight: 500; margin: 0 0 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.th-home-hero__cta { display: inline-flex; align-items: center; gap: 15px; margin-top: 2px; color: #222c3b; font-size: 13px; font-weight: 750; }
.th-home-hero__cta-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #222b3a; background: #fff; transition: color .2s, background .2s; }
.th-home-hero__cta:hover .th-home-hero__cta-icon { color: #fff; background: #222b3a; }
.th-home-hero__cta-icon svg { width: 16px !important; height: 16px !important; }
.th-home-hero__controls { position: absolute; z-index: 4; bottom: 24px; right: clamp(25px,4.8vw,74px); display: flex; align-items: center; gap: 9px; }
.th-home-hero__counter { margin-right: 34px; white-space: nowrap; color: #687384; font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .025em; }
.th-home-hero__counter span { padding-inline: 10px; color: #aab2be; }
.th-home-hero__control { display: inline-flex; justify-content: center; align-items: center; border: 0; width: 30px; height: 30px; border-radius: 50%; background: #edf0f5; color: #354052; padding: 4px; transition: background .2s, color .2s; }
.th-home-hero__control:hover { background: #202b3d; color: #fff; }
.th-home-hero__control svg { width: 17px !important; height: 17px !important; }
.th-home-hero__empty { min-height: 310px; padding: 48px 9%; background: linear-gradient(115deg,#d8e8e4,#f1f4f5); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.th-home-hero__empty h2 { margin: 0; font-size: clamp(23px,4vw,44px); line-height: 1.5; }
.th-home-hero__empty p { margin: 0; }
.th-home-hero__empty .th-home-hero__eyebrow { color: #427e8e; font-size: 11px; letter-spacing: .3em; }
.th-home-hero__empty > a { display: inline-block; align-self: flex-start; padding: 10px 17px; border: 1px solid; border-radius: 20px; font-size: 12px; }
.th-home-hero .th-home-image-fallback { height: 100%; width: 100%; }

/* Section heading: compact magazine rhythm. */
.th-home-section { margin-top: 24px; }
.th-home-section__head { min-height: 28px; display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 9px; }
.th-home-section__head-left { min-width: 0; display: flex; align-items: center; gap: 14px; }
.th-home-section__head h2 { font-size: 18px; font-weight: 800; line-height: 1.35; letter-spacing: .03em; margin: 0; white-space: nowrap; }
.th-home-section__rule { display: inline-block; height: 1px; width: 28px; flex: 0 0 auto; background: #8b94a2; }
.th-home-section__head p { font-size: 10px; margin: 0; color: #969ca8; letter-spacing: .045em; }
.th-home-section__more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; font-size: 11px; color: #414b5e !important; }
.th-home-section__more svg { width: 16px !important; height: 16px !important; transition: transform .2s; }
.th-home-section__more:hover svg { transform: translateX(3px); }
.th-home-empty { padding: 40px; margin: 0; border: 1px dashed #e1e6eb; color: #748094; font-size: 12px; text-align: center; }

/* Featured four-up photo stories. */
.th-home-features__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.th-home-feature { min-width: 0; }
.th-home-feature__link { display: block; min-width: 0; height: 100%; }
.th-home-feature__media { display: block; position: relative; aspect-ratio: 2.15; overflow: hidden; background: #e1e9e7; border-radius: 3px 3px 0 0; }
.th-home-feature__image { height: 100% !important; width: 100%; object-fit: cover; transition: transform .35s ease; }
.th-home-feature__link:hover .th-home-feature__image { transform: scale(1.04); }
.th-home-image-fallback { display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; background: linear-gradient(135deg,#d6e3e7,#c7d8d2 55%,#f1ebdd); color: #3b5561; }
.th-home-image-fallback > span { font-size: 20px; font-weight: 800; letter-spacing: -.035em; }
.th-home-image-fallback > span > span { color: #7472d8; }
.th-home-feature__content { display: block; position: relative; padding: 10px 33px 6px 7px; min-height: 62px; }
.th-home-feature__label { display: block; color: #707986; font-size: 10px; line-height: 1.25; margin-bottom: 5px; }
.th-home-feature__title { display: block; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: #202633; font-size: 13px; line-height: 1.5; font-weight: 750; }
.th-home-feature__subtitle { display: block; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: #4f5868; font-size: 12px; line-height: 1.5; margin-top: 2px; }
.th-home-feature__arrow { position: absolute; top: 22px; right: 3px; display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50%; background: #eff1f5; color: #17202e; }
.th-home-feature__arrow svg { width: 16px !important; height: 16px !important; }
.th-home-feature__link:hover .th-home-feature__title { color: #2d7aca; }

/* Compact horizontal popular cards. */
.th-home-popular { margin-top: 20px; }
.th-home-popular__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 21px; }
.th-home-popular__item { min-width: 0; }
.th-home-popular__link { display: grid; grid-template-columns: minmax(95px,42%) minmax(0,1fr); gap: 12px; align-items: center; min-width: 0; }
.th-home-popular__media { display: block; position: relative; width: 100%; aspect-ratio: 1.64; border-radius: 2px; overflow: hidden; background: #e4e8e8; }
.th-home-popular__image { height: 100% !important; width: 100%; object-fit: cover; transition: transform .3s; }
.th-home-popular__link:hover .th-home-popular__image { transform: scale(1.05); }
.th-home-popular__number { position: absolute; left: 0; top: 0; min-width: 23px; height: 27px; padding: 5px; background: rgba(27,34,44,.86); color: #fff; font-size: 12px; line-height: 17px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.th-home-popular__item:first-child .th-home-popular__number { background: rgba(191,146,66,.90); }
.th-home-popular__body { display: block; min-width: 0; }
.th-home-popular__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: 9px; line-height: 1.3; }
.th-home-popular__category { color: #2d80ee; font-weight: 750; }
.th-home-popular__meta time { color: #8993a5; padding-left: 8px; border-left: 1px solid #dae0e8; font-variant-numeric: tabular-nums; }
.th-home-popular__title { display: block; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.6; color: #252c3a; font-weight: 750; }
.th-home-popular__link:hover .th-home-popular__title { color: #2b7dd4; }

/* Category image tiles. */
.th-home-categories { margin-top: 26px; }
.th-home-categories__grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 8px; }
.th-home-category { display: block; position: relative; min-width: 0; height: 90px; overflow: hidden; border-radius: 3px; background: #758788; isolation: isolate; }
.th-home-category__media { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.th-home-category__media img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .35s ease; }
.th-home-category:hover .th-home-category__media img { transform: scale(1.08); }
.th-home-category__overlay { display: block; position: absolute; z-index: 1; inset: 0; background: linear-gradient(0deg, rgba(6,17,30,.67), rgba(12,29,30,.18)); }
.th-home-category__content { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: flex-end; flex-direction: column; inset: 0 4px 9px; gap: 5px; color: #fff; text-align: center; }
.th-home-category__icon { display: inline-flex; justify-content: center; align-items: center; }
.th-home-category__icon svg { width: 24px !important; height: 24px !important; stroke-width: 1.6; }
.th-home-category__name { display: block; font-size: 12px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; text-shadow: 0 2px 6px rgba(0,0,0,.42); }
.th-home-image-fallback--category { background: linear-gradient(130deg,#c6d6d0,#9faba5); }

/* Footer: existing reusable template with home-specific magazine scale. */
body.home .th-footer { padding: 20px 0; border-top: 1px solid #edf0f3; background: #fff; }
body.home .th-footer__inner { flex-wrap: wrap; }
body.home .th-footer .th-brand { font-size: 17px; }
body.home .th-footer p { font-size: 10px; display: inline; margin-left: 12px; }
body.home .th-footer__links { max-width: none; }
body.home .th-footer__menu a { font-size: 10px; }
body.home .th-footer__end { gap: 16px; }
body.home .th-footer__links a { font-size: 10px; }
body.home .th-footer__end small { font-size: 9px; }

/* Below 1200: tighten text and cards while preserving information. */
@media (max-width: 1199px) {
    body.home .th-container { padding-inline: 28px; }
    .th-home-hero__slide { grid-template-columns: minmax(0,1.62fr) minmax(310px,1fr); }
    .th-home-hero__title { font-size: clamp(20px,2.1vw,27px); }
    .th-home-section__head p { max-width: 450px; }
    .th-home-features__grid { gap: 12px; }
    .th-home-popular__grid { gap: 14px; }
    .th-home-popular__link { grid-template-columns: 40% minmax(0,1fr); gap: 9px; }
}
@media (max-width: 990px) {
    .th-home-features__grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    .th-home-features__grid .th-home-feature__media { aspect-ratio: 2.1; }
    .th-home-popular__grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 22px; }
    .th-home-categories__grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
    .th-home-category { height: 106px; }
}
@media (max-width: 880px) {
    body.home .th-header__inner { height: 60px; }
    body.home .th-header__tagline { display: none; }
    body.home .th-container { padding-inline: 24px; }
    .th-home-hero__slide { display: flex; flex-direction: column; height: auto; }
    .th-home-hero__visual { height: clamp(240px, 45vw, 430px); }
    .th-home-hero__content { min-height: 265px; padding: 25px 24px 65px; }
    .th-home-hero__overlay-copy { left: 9%; max-width: 45%; font-size: clamp(18px,4vw,26px); }
    .th-home-hero__title { font-size: clamp(23px,3.4vw,30px); max-width: 670px; }
    .th-home-hero__excerpt { max-width: 720px; }
    .th-home-hero__controls { right: 24px; bottom: 22px; }
    .th-home-section { margin-top: 34px; }
    .th-home-section__head { flex-wrap: wrap; }
    .th-home-section__head-left { gap: 10px; }
    .th-home-section__head h2 { font-size: 17px; }
}
@media (max-width: 640px) {
    body.home .th-container { padding-inline: 18px; }
    body.home .th-header__inner { height: 58px; }
    .th-home-hero__visual { height: clamp(214px, 61vw, 360px); }
    .th-home-hero__overlay-copy { max-width: 50%; left: 9%; font-size: clamp(15px,3.8vw,22px); line-height: 1.7; }
    .th-home-hero__content { min-height: 253px; padding: 23px 19px 59px; }
    .th-home-hero__meta { margin-bottom: 11px; }
    .th-home-hero__title { font-size: clamp(20px,5.7vw,27px); margin-bottom: 10px; }
    .th-home-hero__excerpt { font-size: 11px; -webkit-line-clamp: 2; margin-bottom: 12px; }
    .th-home-hero__cta { gap: 11px; font-size: 12px; }
    .th-home-hero__cta-icon { height: 32px; width: 32px; }
    .th-home-hero__controls { bottom: 16px; right: 18px; }
    .th-home-hero__counter { margin-right: 10px; }
    .th-home-section { margin-top: 29px; }
    .th-home-section__head { margin-bottom: 12px; }
    .th-home-section__head h2 { font-size: 16px; }
    .th-home-section__head-left { flex-wrap: wrap; column-gap: 9px; row-gap: 5px; }
    .th-home-section__head p { width: 100%; font-size: 10px; order: 3; }
    .th-home-section__rule { width: 22px; }
    .th-home-section__more { font-size: 10px; }
    .th-home-features__grid { gap: 12px; }
    .th-home-feature__media { aspect-ratio: 1.6 !important; }
    .th-home-feature__content { min-height: 86px; padding: 8px 24px 5px 2px; }
    .th-home-feature__title { font-size: 12px; -webkit-line-clamp: 2; }
    .th-home-feature__subtitle { font-size: 10px; }
    .th-home-feature__arrow { width: 22px; height: 22px; right: 0; top: 27px; }
    .th-home-popular__grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
    .th-home-popular__link { grid-template-columns: 36% 1fr; gap: 13px; }
    .th-home-popular__title { font-size: 13px; }
    .th-home-popular__meta { font-size: 10px; }
    .th-home-categories__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .th-home-category { height: 94px; }
    .th-home-category__name { font-size: 12px; }
    body.home .th-footer p { display: block; margin: 8px 0 0; }
    body.home .th-footer__inner { gap: 17px; }
}
@media (max-width: 370px) {
    .th-home-hero__overlay-copy { max-width: 64%; }
    .th-home-features__grid { gap: 9px; }
    .th-home-feature__title { font-size: 11px; }
    .th-home-feature__subtitle { font-size: 10px; }
    .th-home-hero__counter { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .th-home *, .th-home *::before, .th-home *::after { scroll-behavior: auto !important; transition: none !important; }
}
