/* ============================================================
   Hitomachi Press Extras — トップページ・ヘッダー・フッター
   色・フォント・角丸はテーマ（main.css）の変数をそのまま使う。
   ============================================================ */

.hpx-main,
.hpx-footer {
  --hpx-max: 1160px;
  --hpx-gutter: var(--gutter, clamp(20px, 5vw, 60px));
  --hpx-line: var(--border, #e5e3de);
  --hpx-ink: var(--text, #151414);
  --hpx-mid: var(--text-mid, #55524c);
  --hpx-lt: var(--text-lt, #8a8780);
  --hpx-soft: var(--bg-soft, #f7f6f3);
  --hpx-dark: var(--hero-dark, #1c1d1d);
  --hpx-ease: var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.hpx-main {
  display: block;
  color: var(--hpx-ink);
  background: var(--bg, #fff);
  overflow-x: clip;
}
.hpx-main :where(h1, h2, h3, p, ul, li) { margin: 0; padding: 0; }
.hpx-main :where(ul) { list-style: none; }
.hpx-main :where(a) { color: inherit; text-decoration: none; }
.hpx-main :where(a, button, select, input):focus-visible,
.hpx-footer a:focus-visible {
  outline: 2px solid var(--hpx-ink);
  outline-offset: 3px;
}

.hpx-wrap {
  width: 100%;
  max-width: calc(var(--hpx-max) + var(--hpx-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--hpx-gutter);
}

.hpx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── ヘッダー（メニュー） ── */
.site-nav.hpx-nav {
  flex: 1;
  min-width: 0;
  gap: 0;
  margin-left: 28px;
  justify-content: flex-end;
}
.hpx-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}
.site-nav.hpx-nav .hpx-nav__links a {
  padding: 6px 11px;
  color: var(--text, #151414);
  white-space: nowrap;
  transition: opacity .2s;
}
.site-nav.hpx-nav .hpx-nav__links a:hover { opacity: .55; }
.hpx-nav__btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-nav.hpx-nav .btn-login {
  padding: 9px 20px !important;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}
.site-nav.hpx-nav .btn-login--outline { border-color: var(--text, #151414) !important; }

/* メニューが収まらない幅では、テーマのハンバーガーメニューに切り替える */
@media (max-width: 1120px) {
  .hpx-chrome .site-nav.hpx-nav { display: none; }
  .hpx-chrome .hamburger { display: flex; }
}

.drawer-footer .hpx-drawer-outline {
  background: transparent;
  color: var(--text, #151414);
  border: 1px solid var(--text, #151414);
}
.drawer-footer .hpx-drawer-outline:hover { background: var(--tag-bg, #f7f6f3); }
.drawer-footer .hpx-drawer-sub {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  text-align: center;
  color: var(--text-mid, #55524c);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 見出し ── */
.hpx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 30px;
}
.hpx-head__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 18px;
  line-height: 1.25;
}
.hpx-head__en {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .01em;
}
.hpx-head__ja {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
}
.hpx-head__ja::before {
  content: "";
  width: 1px;
  height: 22px;
  background: #9a978f;
  transform: rotate(34deg);
}
.hpx-head__lead {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--hpx-lt);
}

.hpx-more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
}
.hpx-more__arrow { transition: transform .3s var(--hpx-ease); }
.hpx-more:hover .hpx-more__arrow,
.hpx-cta:hover .hpx-more__arrow { transform: translateX(5px); }
.hpx-more--underline .hpx-more__label {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--hpx-ink);
}

/* ── メインビジュアル ── */
.hpx-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: clamp(360px, 34vw, 520px);
  margin-top: 64px; /* 固定ヘッダーの高さ */
  overflow: hidden;
  background: var(--hpx-dark);
  color: #fff;
}
.hpx-hero__media { position: absolute; inset: 0; }
.hpx-hero__media img,
.hpx-hero__media video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.hpx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .46) 0%, rgba(0, 0, 0, .14) 55%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .38) 100%);
  pointer-events: none;
}
.hpx-hero__inner {
  position: relative;
  z-index: 1;
  padding-bottom: 52px;
}
.hpx-hero__label {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
}
.hpx-hero__title {
  font-size: clamp(28px, 3.3vw, 46px);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: .05em;
}
.hpx-hero__sub {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .1em;
}
.hpx-hero__credit {
  position: absolute;
  z-index: 1;
  right: var(--hpx-gutter);
  bottom: 18px;
  font-size: 11px;
  line-height: 1.6;
  text-align: right;
  opacity: .85;
}

/* ── セクション共通 ── */
.hpx-sec { padding: 62px 0; scroll-margin-top: 40px; } /* 固定ヘッダーに隠れない位置で止める */
.hpx-search { padding-top: 108px; }
.hpx-creators { padding-bottom: 72px; }

/* ── SEARCH ── */
.hpx-search__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.33fr) 184px;
  border: 1px solid var(--hpx-line);
  background: #fff;
}
.hpx-search__field {
  position: relative;
  display: block;
  min-width: 0;
  border-right: 1px solid var(--hpx-line);
}
.hpx-search__field select,
.hpx-search__field input {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--hpx-ink);
  -webkit-appearance: none;
  appearance: none;
}
.hpx-search__field select {
  padding-right: 52px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.hpx-search__field input::placeholder { color: #a5a29b; }
.hpx-search__field--select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 1.5px solid var(--hpx-ink);
  border-bottom: 1.5px solid var(--hpx-ink);
  transform: rotate(45deg);
  pointer-events: none;
}
.hpx-search__field select:focus-visible,
.hpx-search__field input:focus-visible { outline-offset: -2px; }
.hpx-search__submit {
  margin: -1px -1px -1px 0;
  border: 0;
  border-radius: 0;
  background: var(--hpx-ink);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  cursor: pointer;
  transition: opacity .2s;
}
.hpx-search__submit:hover { opacity: .82; }

/* ── AREA ── */
.hpx-area__grid {
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  gap: 24px 56px;
  align-items: start;
}
.hpx-area__map {
  max-width: 360px;
  opacity: .26;
  filter: grayscale(1);
}
.hpx-area__map img { display: block; width: 100%; height: auto; }
.hpx-area__body { padding-top: 6px; }
.hpx-area__regions {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1.06fr;
  gap: 38px 24px;
}
.hpx-region__name {
  margin-bottom: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
}
.hpx-region__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  margin-left: -7px;
}
.hpx-pref {
  display: block;
  padding: 3px 7px;
  border-radius: 2px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #77736c;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.hpx-pref:hover { color: var(--hpx-ink); background: var(--hpx-soft); }
.hpx-pref.is-active {
  background: #e4e6e8;
  color: var(--hpx-ink);
  font-weight: 500;
}
.hpx-pref.is-active:hover { background: #d6d9dc; }
.hpx-area .hpx-more--underline { margin-top: 46px; }

/* ── カード共通 ── */
.hpx-grid { display: grid; gap: 36px 28px; }
.hpx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hpx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hpx-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 36px 26px; }

.hpx-card { display: block; }
.hpx-card__fig {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--hpx-soft);
}
.hpx-card__fig img,
.hpx-row__fig img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform .7s var(--hpx-ease);
}
.hpx-card:hover .hpx-card__fig img,
.hpx-row:hover .hpx-row__fig img { transform: scale(1.04); }

/* 写真がないときの仮の画像 */
.hpx-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--hpx-dark);
  color: #fff;
}
.hpx-ph--soft { background: var(--hpx-soft); }
.hpx-ph__small { font-size: 10px; font-weight: 500; letter-spacing: .32em; opacity: .6; }
.hpx-ph__big { font-size: 19px; font-weight: 700; letter-spacing: .14em; }

/* FEATURE */
.hpx-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--hpx-mid);
}
.hpx-card__meta span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 10px;
  margin: 0 10px;
  background: #b9b6af;
}
.hpx-card__title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .02em;
}
.hpx-card__fig + .hpx-card__title { margin-top: 14px; }

/* GENRE */
.hpx-card--genre .hpx-card__fig { aspect-ratio: 8 / 5; }
.hpx-card__label {
  display: block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
}

/* CONTENTS */
.hpx-card--contents .hpx-card__fig { aspect-ratio: 5 / 4; }
.hpx-card__en {
  display: block;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .05em;
}
.hpx-card__ja {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--hpx-mid);
}

/* CREATORS */
.hpx-card--creator .hpx-card__fig { aspect-ratio: 5 / 4; }
.hpx-card--creator .hpx-card__fig img { object-position: 50% 28%; }
.hpx-card__role {
  display: block;
  margin-top: 15px;
  font-size: 12.5px;
  color: var(--hpx-mid);
}
.hpx-card__name {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .06em;
}
.hpx-card__fig + .hpx-card__name { margin-top: 15px; }

/* ── LATEST ── */
.hpx-row {
  display: grid;
  grid-template-columns: 180px 176px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 0 26px;
  padding: 10px 6px 10px 0;
  border-bottom: 1px solid var(--hpx-line);
  transition: background .2s;
}
.hpx-row:hover { background: var(--hpx-soft); }
.hpx-row__fig {
  position: relative;
  display: block;
  aspect-ratio: 180 / 66;
  overflow: hidden;
  background: var(--hpx-soft);
}
.hpx-row__tags { display: flex; gap: 8px; }
.hpx-tag {
  display: inline-flex;
  justify-content: center;
  min-width: 84px;
  padding: 4px 10px;
  border: 1px solid var(--hpx-line);
  background: #fff;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
}
.hpx-row__title {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.65;
}
.hpx-row__arrow {
  justify-self: end;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--hpx-lt);
  border-right: 1.5px solid var(--hpx-lt);
  transform: rotate(45deg);
}

/* ── ページ下の帯 ── */
.hpx-cta-wrap {
  max-width: var(--max, 1440px);
  margin: 0 auto;
  padding: 0 var(--hpx-gutter);
}
.hpx-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px 40px;
  min-height: 188px;
  padding: 40px clamp(28px, 6.5vw, 84px);
  overflow: hidden;
  background: var(--hpx-dark);
  color: #fff;
}
.hpx-cta__bg {
  position: absolute;
  inset: 0 0 0 auto;
  width: 70%;
}
.hpx-cta__bg img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.hpx-cta__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1c1d1d 0%, rgba(28, 29, 29, .72) 34%, rgba(28, 29, 29, .38) 100%);
}
.hpx-cta__text { position: relative; }
.hpx-cta__title {
  display: block;
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .07em;
}
.hpx-nb { display: inline-block; }
.hpx-cta__sub {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  letter-spacing: .08em;
  opacity: .9;
}
.hpx-cta__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 22px;
  padding: 18px 42px;
  border: 1px solid rgba(255, 255, 255, .85);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.hpx-cta:hover .hpx-cta__btn { background: #fff; color: var(--hpx-ink); }
.hpx-main .hpx-cta:focus-visible { outline-offset: 4px; }

/* ── フッター ── */
.site-footer.hpx-footer {
  padding: 0;
  border-top: 0;
  background: var(--bg, #fff);
}
.hpx-footer a { color: inherit; text-decoration: none; transition: opacity .2s; }
.hpx-footer a:hover { opacity: .55; }
.hpx-footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 44px;
  max-width: var(--max, 1440px);
  margin: 0 auto;
  padding: 36px var(--hpx-gutter) 26px;
}
.hpx-footer__logo {
  font-family: var(--font-d, inherit);
  font-size: 19px;
  font-weight: 700;
  color: var(--hpx-ink);
}
.hpx-footer__nav,
.hpx-footer__legal,
.hpx-footer__more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}
.hpx-footer__nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--hpx-ink);
}
.hpx-footer__legal { margin-left: auto; gap: 6px 22px; }
.hpx-footer__legal a,
.hpx-footer__more a,
.hpx-footer__copy {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--hpx-mid);
}
.hpx-footer__sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 max(var(--hpx-gutter), calc((100% - var(--max, 1440px)) / 2 + var(--hpx-gutter)));
  padding: 16px 0 30px;
  border-top: 1px solid var(--hpx-line);
}
.hpx-top .hpx-footer { padding-top: 6px; }

/* ── タブレット ── */
@media (max-width: 1000px) {
  .hpx-area__grid { grid-template-columns: minmax(0, 1fr); }
  .hpx-area__map { display: none; }
  .hpx-row { grid-template-columns: 150px 176px minmax(0, 1fr) 14px; gap: 0 20px; }
  .hpx-grid--5 { gap: 30px 18px; }
  .hpx-grid--4 { gap: 30px 20px; }
  .hpx-footer__legal { margin-left: 0; }
}

/* ── スマホ ── */
@media (max-width: 768px) {
  .hpx-sec { padding: 44px 0; }
  .hpx-search { padding-top: 60px; }
  .hpx-creators { padding-bottom: 56px; }

  .hpx-head { flex-wrap: wrap; margin-bottom: 22px; }
  .hpx-head__title { gap: 2px 14px; }
  .hpx-head__en { font-size: 27px; }
  .hpx-head__ja { gap: 12px; font-size: 14px; }
  .hpx-head__ja::before { height: 18px; }
  .hpx-head__lead { margin-top: 8px; font-size: 12.5px; }

  .hpx-hero { height: auto; min-height: 400px; }
  .hpx-hero::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .1) 35%, rgba(0, 0, 0, .58) 100%);
  }
  .hpx-hero__inner { padding-top: 120px; padding-bottom: 56px; }
  .hpx-hero__label { margin-bottom: 10px; font-size: 12px; }
  .hpx-hero__sub { margin-top: 12px; font-size: 13.5px; }
  .hpx-hero__credit { bottom: 14px; font-size: 10px; }

  .hpx-search__form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hpx-search__field select,
  .hpx-search__field input { height: 54px; padding: 0 18px; font-size: 16px; } /* 16px未満だとiPhoneで画面が拡大する */
  .hpx-search__field select { padding-right: 40px; }
  .hpx-search__field--select::after { right: 18px; }
  .hpx-search__field--select + .hpx-search__field--select { border-right: 0; }
  .hpx-search__field--text {
    grid-column: 1 / -1;
    border-right: 0;
    border-top: 1px solid var(--hpx-line);
  }
  .hpx-search__submit { grid-column: 1 / -1; height: 54px; margin: 0 -1px -1px; }

  .hpx-area__regions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .hpx-area .hpx-more--underline { margin-top: 32px; }

  .hpx-grid { gap: 28px 16px; }
  .hpx-grid--4,
  .hpx-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .hpx-grid--5 > :first-child { grid-column: 1 / -1; }
  .hpx-grid--5 > :first-child .hpx-card__fig { aspect-ratio: 16 / 9; }
  .hpx-card__label { margin-top: 12px; font-size: 14px; }
  .hpx-card__en { margin-top: 11px; font-size: 15px; }
  .hpx-card__role { margin-top: 12px; font-size: 12px; }
  .hpx-card__name { font-size: 16px; }
  .hpx-card__fig + .hpx-card__name { margin-top: 12px; }

  .hpx-row {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 7px 14px;
    padding: 14px 0;
  }
  .hpx-row:hover { background: none; }
  .hpx-row__fig { grid-row: 1 / 3; aspect-ratio: 4 / 3; }
  .hpx-row__tags { flex-wrap: wrap; gap: 6px; }
  .hpx-tag { min-width: 0; padding: 2px 9px; font-size: 11px; }
  .hpx-row__title { font-size: 14px; }
  .hpx-row__arrow { display: none; }

  .hpx-cta {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 36px 24px 30px;
  }
  .hpx-cta__title { font-size: 21px; letter-spacing: .05em; }
  .hpx-cta__bg { width: 100%; }
  .hpx-cta__bg::after { background: rgba(28, 29, 29, .68); }
  .hpx-cta__sub { font-size: 13px; }
  .hpx-cta__btn { justify-content: center; padding: 16px 20px; }

  .hpx-footer__inner { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 34px; }
  .hpx-footer__nav { gap: 10px 22px; }
  .hpx-footer__sub { flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
}

@media (max-width: 640px) {
  .hpx-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .hpx-card--feature .hpx-card__fig { aspect-ratio: 16 / 9; }
}

@media (max-width: 400px) {
  .hpx-area__regions { gap: 24px 14px; }
  .hpx-pref { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hpx-main *,
  .hpx-footer * { transition: none !important; }
}

/* ログイン中の管理バーに、固定ヘッダーが隠れないようにする */
.admin-bar.hpx-chrome .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar.hpx-chrome .site-header { top: 46px; }
}
