/* =============================================
   top.css — TOP ページ
   ============================================= */

/* --- Variables（Figma変数に対応） --- */
:root {
  --bg:        #f7f5f2;  /* color/surface */
  --white:     #ffffff;  /* color/background */
  --text:      #231816;  /* color/text/base */
  --sub:       #665954;  /* color/text/secondary */
  --accent:    #df462f;  /* color/accent */
  --gold:      #b7a53d;  /* color/label */
  --border:    #e0ddda;  /* color/border */
  --thumb-bg:  #d9d9d9;  /* color/placeholder */
  --font:      'Noto Serif JP', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* =============================================
   ユーティリティ：SP幅でのみ改行する <br class="sp-br">
   ============================================= */
.sp-br { display: none; }

/* =============================================
   ユーティリティ：SP幅でのみ表示する要素
   ============================================= */
.sp-only { display: none; }

/* =============================================
   全幅背景帯（セクションごとに背景色を変える場合のみ使用）
   ============================================= */
.band {
  position: relative;
}

.band::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
}

.band--cream::before { background: var(--bg); }

/* =============================================
   共通：セクション見出し
   ============================================= */
.sec {
  box-sizing: content-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.sec-head {
  text-align: center;
  margin-bottom: 48px;
}

.sec-en {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--gold);
}

.sec-ja {
  font-size: 30px;
  font-weight: 700;
  margin-top: 10px;
}

.sec-bar {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
}

/* =============================================
   FV
   ============================================= */
.fv { width: 100vw; margin-left: calc(50% - 50vw); }
.fv__img { width: 100%; height: auto; }

/* =============================================
   アワード概要
   ============================================= */
.overview__lead {
  margin: 0 auto 40px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.8;
  font-feature-settings: 'palt';
}

.overview__detail {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}

.overview__bar {
  width: 6px;
  background: var(--accent);
}

.overview__row {
  display: flex;
  gap: 24px;
  font-size: 18px;
  font-weight: 600;
}

.overview__row dt {
  flex: 0 0 140px;
  white-space: nowrap;
}

.overview__row dd { flex: 1; }

/* =============================================
   わが家のマイスターとは
   ============================================= */
.about__text {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.8;
}

/* =============================================
   参加方法／投票の流れ
   ============================================= */
.howto__lead {
  text-align: center;
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 48px;
}

.howto__sub {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
}

.steps {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 16px;
}

.step {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  min-height: 150px;
}

.step__icon {
  width: 64px;
  flex-shrink: 0;
  object-fit: contain;
  margin-top: 8px;
}

.step__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step__num {
  display: inline-flex;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  padding: 3px 14px;
  border-radius: 2px;
}

.step__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.step__arrow {
  font-size: 22px;
  color: var(--sub);
}

/* =============================================
   エントリー事例一覧
   ============================================= */
.division-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.division-tab {
  flex: 1 1 0;
  max-width: 360px;
  height: 50px;
  border: 1px solid var(--white);
  background: var(--thumb-bg);
  color: var(--sub);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.division-tab.is-active {
  background: var(--gold);
  color: var(--text);
}

.entry-cards-wrap {
  position: relative;
  margin-bottom: 40px;
}

.division-tabs__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 5rem;
  line-height: 1;
  color: var(--sub);
  cursor: pointer;
  padding: 0;
}

.division-tabs__arrow--prev { right: calc(100% + 24px); }
.division-tabs__arrow--next { left: calc(100% + 24px); }

.division-tabs__arrow:disabled {
  opacity: .5;
  cursor: not-allowed;
}

#entry-panels { width: 100%; }

.entry-cards[hidden] { display: none; }

.entry-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.entry-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(35, 24, 22, .07);
  overflow: hidden;
}

.entry-card__thumb {
  position: relative;
  background: var(--thumb-bg);
  aspect-ratio: 376 / 240;
  overflow: hidden;
}

.entry-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-card__index-row {
  color: var(--gold);
  display: flex;
  align-items: baseline;
}

.entry-card__store::before {
  content: ' ｜ ';
}

.entry-card__index {
  font-size: 28px;
}

.entry-card__store {
  font-size: 12px;
}

.entry-card__title {
  font-size: 16px;
  font-weight: 700;
  min-height: 2lh;
}

.entry-card__desc {
  display: none;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--sub);
}

.entry-card__divider {
  border-top: 1px solid var(--border);
}

.entry-card__vote {
  font-family: var(--font);
  display: block;
  width: 100%;
  background: rgba(223, 70, 47, .5);
  color: var(--white);
  border: none;
  padding: 10px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .3s, opacity .3s;
}

.entry-card__vote.is-selected {
  background: var(--accent);
}

.entry-card__detail {
  display: block;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--sub);
  border-radius: 2px;
  padding: 8px;
  font-size: 12px;
}

.vote-confirm {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.vote-confirm__btn {
  font-family: var(--font);
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 16px;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .3s, color .3s, opacity .3s;
}

.vote-confirm__btn:disabled {
  background: var(--border);
  color: var(--sub);
  cursor: not-allowed;
}

.vote-confirm__note {
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  padding: 14px;
}

/* =============================================
   よくある質問
   ============================================= */
.faq-list {
  margin-bottom: 40px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: -1px;
}

.faq-item:nth-child(odd) {
  background: var(--bg);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  padding: 18px 24px;
  cursor: pointer;
  color: var(--text);
}

.faq-q__icon {
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform .2s;
}

.faq-a {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.8;
  color: var(--sub);
  transition: grid-template-rows .3s ease;
}

.faq-a__inner {
  overflow: hidden;
  padding: 0 24px 16px;
}

.faq-a__link {
  text-decoration: underline;
}

.faq-item.is-open .faq-a { grid-template-rows: minmax(0, 1fr); }
.faq-item.is-open .faq-q__icon { transform: rotate(45deg); }

.sns-banner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.sns-banner__link img {
  width: 40px;
  height: auto;
}

/* =============================================
   わが家のマイスターにおまかせください
   ============================================= */
.brand-cta__box {
  max-width: 808px;
  margin: 0 auto;
  border: 1px solid var(--sub);
  padding: 24px 32px;
}

.brand-cta__title {
  text-align: center;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 16px;
}

.brand-cta__row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-cta__img {
  flex-shrink: 0;
  width: 95px;
}

.brand-cta__content {
  flex: 1;
  text-align: left;
}

.brand-cta__text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--sub);
  margin-bottom: 16px;
}

.brand-cta__buttons {
  display: flex;
  gap: 16px;
}

.btn-outline {
  flex: 1;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--text);
  padding: 14px 32px;
  font-size: 18px;
  color: var(--sub);
}

/* =============================================
   選ばれる3つの理由
   ============================================= */
.reasons__title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 40px;
}

.reasons__list {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.reason {
  flex: 1 1 320px;
  max-width: 338px;
  background: var(--sub);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  text-align: center;
}

.reason__point {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.reason__point span { font-size: 24px; }

.reason__heading {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
}

.reason__text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
  text-align: left;
}

/* =============================================
   ロゴ帯（フッター）
   ============================================= */
.page-footer {
  text-align: center;
  padding: 40px 24px;
}

.page-footer__caption {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
}

.page-footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.page-footer__logo {
  width: 220px;
}

/* =============================================
   投票確認モーダル
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s ease .25s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility 0s ease 0s;
}

.modal {
  background: var(--bg);
  width: 100%;
  max-width: 840px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform .25s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal__inner {
  padding: 40px 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.modal__title {
  font-size: 28px;
  font-weight: 400;
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--text);
}

.modal__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.modal-thumb {
  aspect-ratio: 238 / 154;
  background: var(--thumb-bg);
  overflow: hidden;
  position: relative;
}

.modal-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-thumb__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--sub);
}

.modal__warning {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__warning-title {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal__warning-icon {
  width: 1.4em;
  height: auto;
  flex-shrink: 0;
}

.modal__warning-text {
  font-size: 18px;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.modal__submit {
  font-family: var(--font);
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 14px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}

.modal__submit:hover { opacity: .85; }

.modal__close {
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 275px;
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: 2px;
  padding: 6px 16px;
  font-size: 15px;
  color: var(--sub);
  cursor: pointer;
  transition: opacity .2s;
}

.modal__close:hover { opacity: .7; }

/* =============================================
   SP（1024px以下）
   ============================================= */
@media (max-width: 1024px) {
  .steps { flex-direction: column; }
  .step { width: 100%; }
  .step__arrow { transform: rotate(90deg); align-self: center; }

  .division-tabs__arrow {
    position: static;
    transform: none;
    flex-shrink: 0;
    font-size: 2rem;
  }
  .entry-cards-wrap{
    display: flex;
    gap: 1rem;
  }
  .entry-cards{
    width: auto;
  }
}

/* =============================================
   SP（768px以下）
   ============================================= */
@media (max-width: 768px) {
  .sp-br { display: inline; }
  .sp-only { display: block; }
  .overview__lead,.about__text {
    font-size: 16px;
  }
  .overview__list{
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .overview__row{
    font-size: 14px;
    flex-direction: column;
    gap: 0.5em;
  }
  .overview__row dt{
    flex-basis: unset;
  }
  .sec { padding: 56px 16px; }

  .entry-cards {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 12px;
  }
  /* .entry-card__desc { display: block; } */

  .entry-card__title {
    font-size: 12px;
    min-height: 3lh;
  }

  .division-tabs { flex-direction: column; }
  .division-tab {
    width: 100%;
    max-width: none;
    flex-basis: unset;
  }

  .entry-cards-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .entry-card__body{
    padding: .5rem;
    gap: 8px;
  }

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

  .entry-card__index-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .entry-card__store::before {
    content: none;
  }

  .entry-card__vote {
    font-size: 12px;
  }

  .division-tabs__arrow {
    display: none;
  }

  .brand-cta__row { flex-direction: column; text-align: center; }
  .brand-cta__content { text-align: center; }
  .brand-cta__buttons {
    flex-direction: column;
    justify-content: center;
  }

  .reasons__list { flex-direction: column; align-items: center; }

  .page-footer__brand { flex-direction: column; gap: 16px; }

  .modal__inner {
    padding: 24px 16px 32px;
    gap: 24px;
  }

  .modal__title { font-size: 18px; }

  .modal__warning-title { font-size: 16px; }
  .modal__warning-text { font-size: 14px; }

  .modal__submit { font-size: 16px; }

  .modal__close { width: 100%; }
}
