/*
 * CRAFT-GO! 出展者リストページ レイアウト専用
 * フォント・色・サイズはcommon.css
 */
/* =====================
   トップページサムネイルの下
======================== */
.p-eventCards {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.p-eventCard {
  position: relative;
  margin: 20px 0;
}

.p-eventCard__link {
  display: block;
  text-decoration: none;
  border: none;
}

.p-eventCard__more {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.8rem;
}

.p-eventCard__pref {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #000;
  background: #fff;
  font-size: 0.65rem;
  text-align: center;
  z-index: 1;
  line-height: 1.3;
}

.p-eventCard__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
}

.p-eventCard__thumb img {
  width: 100%;
  height: 100%;
  border: 1px solid #666;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: border-radius 0.3s ease;
}

.p-eventCard__noimage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  font-size: 0.8rem;
  color: #888;
}

.p-eventCard__body {
  padding: 0 12px;
  font-size: 0.85rem;
}

.p-eventCard__title {
  margin: 0 0 4px;
  line-height: 1.1;
  word-break: break-word;
  font-size: 0.85rem;
  font-weight: normal !important;
}

.p-eventCard__date {
  font-size: 0.9em;
  margin: 0;
}

.p-eventCard__recruit {
  font-size: 0.9em;
  margin: 0 0 4px;
}

.p-eventCard__info {
  font-size: 0.9em;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.p-eventCard__info p {
  margin: 0;
}

.p-eventCard__bottom {
  display: flex;
  gap: 12px;
}

.p-eventCard__main {
  flex: 1;
}

.p-eventCard__side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.p-eventCard__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =====================
   ハートボタン
======================== */
.p-eventCard__bodytext {
  flex: 1;
}

.ccc-favorite-post-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  flex-shrink: 0;
  align-self: flex-start;
}

/* =====================
   募集一覧
======================== */

/* ===== Archive ===== */
.p-entryArchive {
  max-width: 100%;
  font-size: 0.8rem;
  padding: 10px;
}

.p-entryArchive__header { margin-bottom: 32px; }

.p-entryArchive__sort,
.p-entryArchive__recruit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.p-entryArchive__sortBtn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #888;
  border-radius: 4px;
  text-decoration: none;
}

.p-entryArchive__sortBtn.is-active { font-weight: bold; }

.p-entryArchive__tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 32px;
  gap: 8px;
}

.p-entryArchive__tag {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid #888;
  border-radius: 20px;
}

.p-entryArchive__tag.is-active { font-weight: bold; }

.p-entryArchive__count { margin-bottom: 8px; }


/* ===== List ===== */
.p-entryList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.p-entryList__item {
  border-top: 1px solid #000;
}

.p-entryList__item:last-child {
  border-bottom: 1px solid #000;
}


/* ===== 1行レイアウト ===== */
.p-entryList__row {
  display: grid;
  grid-template-columns: 180px 1fr 6em 1fr;
  grid-template-areas: "date name pref footer";
  align-items: center;
  gap: 0 16px;
  padding: 14px 0;
}

/* 囲みタグをグリッドの「footer」エリアに割り当て */
.p-entryList__footer-meta {
  grid-area: footer;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 16px;
  height: 100%;
}

/* ② エリア割当と個別プロパティを1か所に統合 */
.p-entryList__dates        { grid-area: date; }
.p-entryList__name         { grid-area: name; }
.p-entryList__pref         { grid-area: pref; }
.p-entryList__recruitdates { grid-area: recruit; white-space: nowrap; }
.p-entryList__badgeWrap    { grid-area: badge; }
.p-entryList__favorite     { grid-area: favorite; margin-left: auto; text-align: center; min-width: 32px; }

/* 縦線位置を完全一致させる */
.p-entryList__name,
.p-entryList__pref,
.p-entryList__recruitdates,
.p-entryList__badgeWrap {
  padding-left: 16px;
}

/* タイトル強調 */
.p-entryList__name {
  font-size: 0.9rem;
  font-weight: 500;
}

/* 外部サイトアイコン */
.material-symbols-outlined {
  font-size: 16px;
  vertical-align: middle;
}


/* ===== バッジ ===== */
.p-entryList__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  white-space: nowrap;
  border: none;
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.p-entryList__badge--now {
  background: #f3e7b3;
  color: #6b5500;
}

.p-entryList__badge--before {
  background: #c9e1f3;
  color: #3a4d43;
}

.p-entryList__badge--after {
  background: #e5e5e5;
  color: #555;
}


/* ===== Hover ===== */
.p-entryList__row:hover {
  background: #fafafa;
}


/* ===== OpenCall SP ===== */
@media (max-width: 767px) {
  .p-entryList__row {
    display: block;
    padding: 16px 0;
  }

  .p-entryList__name,
  .p-entryList__pref,
  .p-entryList__recruitdates,
  .p-entryList__badgeWrap {
    padding-left: 0;
  }

  .p-entryList__dates {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
  }

  .p-entryList__name {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.4;
  }

  .p-entryList__pref {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 8px;
  }

  .p-entryList__footer-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .p-entryList__recruitdates {
    font-size: 0.75rem;
    color: #666;
  }

  .p-entryList__badgeWrap {
    display: inline-flex;
  }

  .p-entryList__favorite {
    display: inline;
    align-items: center;
  }
}

/* =====================
   イベント 詳細ページ
======================== */

.p-eventSingle {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.p-eventSingle__flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.p-eventSingle__thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 0;
}

.p-eventSingle__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.p-eventSingle__homeBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 1px solid #333;
  border-radius: 24px;
  background-color: #fff;
  color: #333;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.p-eventSingle__favorite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #333;
  border-radius: 50%;
  background-color: #fff;
  transition: opacity 0.2s;
}

.p-eventSingle__homeBtn:hover,
.p-eventSingle__favorite:hover {
  opacity: 0.7;
}

.p-eventSingle__favorite > * {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.p-eventSingle__poster {
  width: min(100%, 440px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid #888;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
}

.p-eventSingle__poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.p-eventSingle__info {
  padding: 32px 10px 40px;
  width: 100%;
}

.p-eventSingle__head {
  margin-bottom: 40px;
}

.p-eventSingle__headMeta {
  margin-bottom: 18px;
}

.p-eventSingle__pref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #000;
  background-color: #000;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

.p-eventSingle__block + .p-eventSingle__block {
  margin-top: 34px;
}
.p-eventSingle__blockLabel {
  margin: 0 0 14px;
  font-size: 0.84rem;
  font-weight: bold;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
}

.p-eventSingle__blockBody {
  display: grid;
  gap: 16px;
}

.p-eventSingle__row {
  display: grid;
  gap: 4px;
}

.p-eventSingle__rowLabel {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #666;
}

.p-eventSingle__rowValue {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.3;
  color: #000;
}

.p-eventSingle__links p {
  margin: 0;
}

.p-eventSingle__links a,
.p-eventSingle__rowValue a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  word-break: break-word;
}

.event-pref,
.event-sub {
  display: inline-block;
}

.event-sub {
  font-size: 0.9em;
}

.p-eventSingle__block--organizer {
  margin-top: 40px;
  padding: 20px;
  background: #F2F2F2;
}

/* =========================
   PCレイアウト（画像左固定）
========================= */
@media (min-width: 1024px) {

  .p-eventSingle {
    max-width: none;
  }

  .p-eventSingle__flex {
    grid-template-columns: 40vw 1fr;
    align-items: start;
  }

.p-eventSingle__thumb {
    position: sticky;
    top: 80px;
    height: 85vh;
    width: 100%;
    align-self: start;
    overflow: hidden; /* ← 追加 */
}

.p-eventSingle__poster,
.p-eventSingle__poster img {
    width: 100%;
    max-width: none;
}

.p-eventSingle__poster {
    aspect-ratio: 1 / 1;    /* ← 追加 */
    overflow: hidden; /* ← 追加 */
    width: 100%;
}

.p-eventSingle__poster img {
    height: 100% !important; /* ← 追加 */
    width: 100% !important;  /* ← !important を追加（元はそのまま） */
    display: block;          /* ← 追加 */
    object-fit: cover;       /* 既存 */
    object-position: center; /* 既存 */
}

  .p-eventSingle__info {
    margin: 0;
    padding: 40px;
  }

}

/* tablet */
@media (max-width: 1024px) {
  .p-eventSingle {
    padding: 32px 16px 64px;
  }

  .p-eventSingle__thumb {
    padding: 32px;
  }

  .p-eventSingle__poster {
    width: min(100%, 360px);
  }

  .p-eventSingle__info {
    padding: 28px 24px 32px;
  }

  .p-eventSingle__head {
    margin-bottom: 32px;
  }

  .p-eventSingle__block + .p-eventSingle__block {
    margin-top: 28px;
  }
  
  .p-eventSingle__block--subImage img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
}

/* sp */
@media (max-width: 767px) {
  .p-eventSingle {
    padding: 24px 12px 56px;
    font-size: 0.9rem;
  }

  .p-eventSingle__flex {
    grid-template-columns: 1fr;
  }

  .p-eventSingle__thumb {
    padding: 20px;
  }

  .p-eventSingle__poster {
    width: min(100%, 320px);
  }

  .p-eventSingle__info {
    border-top: 1px solid #000;
    padding: 24px 16px 28px;
  }

  .p-eventSingle__head {
    margin-bottom: 28px;
  }

  .p-eventSingle__headMeta {
    margin-bottom: 14px;
  }

  .p-eventSingle__title {
    font-size: 1.45rem;
  }

  .p-eventSingle__pref {
    min-width: 46px;
    height: 46px;
    font-size: 0.72rem;
  }

  .p-eventSingle__block + .p-eventSingle__block {
    margin-top: 24px;
  }

  .p-eventSingle__blockLabel {
    margin-bottom: 10px;
    font-size: 0.7rem;
  }

  .p-eventSingle__rowLabel {
    font-size: 0.76rem;
  }

  .p-eventSingle__rowValue {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .p-eventSingle__block--organizer {
    padding-top: 22px;
  }
}

/* =====================
   イベント 一覧ページ
======================== */

.p-eventArchive {
  max-width: 100%;
  padding: 20px;
}

.p-eventArchive__header {
  margin-bottom: 24px;
}

.p-eventArchive__selectFilters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 32px;
}

.p-eventArchive__selectFilters select {
  appearance: none;
  height: 48px;
  min-width: 220px;
  padding: 0 14px;
  text-align: center;
  font-size: 0.95rem;
  border: 1px solid #000;
  border-radius: 3px;
  cursor: pointer;
  background: #fff;
}

.p-eventArchive__selectFilters select:hover {
  border-color: #888;
}

.p-eventArchive__selected {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.p-eventArchive__selectedList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p-eventArchive__selectedItem {
  display: inline-block;
  font-size: 0.85rem;
}

.p-eventArchive__plus {
  margin: 0 4px;
  font-size: 0.9rem;
}

.p-eventArchive__reset {
  display: inline-block;
  font-size: 0.85rem;
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #000;
}

.p-eventArchive__and {
  font-size: 0.9rem;
}

.p-eventArchive__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin: 24px 0 32px;
}

.p-eventArchive__tag {
  display: inline-block;
  padding: 12px;
  font-size: 0.8rem;
  line-height: 1;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  border-radius: 3px;
  text-decoration: none;
}

.p-eventArchive__tag a:hover {
  border-color: #888;
}

.p-eventArchive__count {
  text-align: right;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 12px;
  border-bottom: 1px solid #888;
}


/* =====================
   Responsive
======================== */

@media (max-width: 1024px) {
  .p-eventCards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ④ 768px → 767px に統一 */
@media (max-width: 767px) {
  .p-eventArchive {
    padding: 32px 0px 80px;
  }

  /* ③ .p-entryList__summary（旧グリッド）と .p-entryList__recruitcell（未使用）を削除 */
  .p-entryList__recruitdates {
    white-space: normal;
  }

  .p-entryList__name,
  .p-entryList__pref {
    border-left: 0;
    padding-left: 0;
  }

  .event-dl--entry {
    grid-template-columns: repeat(2, 1fr);
  }

  .p-eventSingle__flex {
    grid-template-columns: 1fr;
  }

  .p-eventSingle__thumb {
    border-right: none;
    border-bottom: 1px solid #000;
  }

  .p-eventSingle__info {
    border-left: none;
  }

  .p-eventCards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .p-eventArchive__filterGroup {
    flex-direction: column;
    align-items: flex-start;
  }
}