/*
Theme Name: Ticket Lab (Emanon Free Child)
Template: emanon-free
Description: チケットラボ用 Emanon Free 子テーマ。トップページをメディアポータル型レイアウトに差し替え、全ページ共通で「関連サイト」欄と追従CTAを追加。
Version: 2.0.2
Author: TicketMe
*/

:root {
  --tm-yellow: #FAF61E;
  --tm-black: #191903;
  --tm-dark: #1A202C;
  --tm-offwhite: #F2F2EF;
  --tm-gray: #CFCFC9;
  --tm-muted: #666;
}

/* =====================================================
   トップページ（front-page.php）専用スタイル
   ===================================================== */
.tl-front { line-height: 1.7; }
.tl-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- ヒーロー --- */
.tl-hero {
  background: var(--tm-offwhite);
  border-bottom: 3px solid var(--tm-yellow);
  padding: 2.2em 0 2.6em;
}
.tl-hero-lead {
  font-size: 1.25em;
  font-weight: 800;
  color: var(--tm-black);
  margin: 0 0 1.2em;
}
.tl-hero-lead mark {
  background: linear-gradient(transparent 60%, var(--tm-yellow) 60%);
}
.tl-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.2em;
}
.tl-hero-main {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tm-black);
}
.tl-hero-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  opacity: .85;
}
.tl-hero-main-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.2em;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.tl-hero-main h2 {
  color: #fff;
  font-size: 1.2em;
  line-height: 1.5;
  margin: .4em 0 0;
}
.tl-hero-sub { display: grid; gap: 1.2em; align-content: start; }
.tl-hero-sub-card {
  display: flex;
  gap: .8em;
  background: #fff;
  border: 1px solid var(--tm-gray);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .2s;
}
.tl-hero-sub-card:hover { box-shadow: 0 0 0 2px var(--tm-yellow); }
.tl-hero-sub-card img {
  width: 110px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  flex-shrink: 0;
}
.tl-hero-sub-card .tl-body { padding: .6em .8em .6em 0; }
.tl-hero-sub-card h3 {
  font-size: .88em;
  margin: .3em 0 0;
  line-height: 1.5;
  color: var(--tm-black);
}

/* --- セクション共通 --- */
.tl-section { padding: 2.5em 0; }
.tl-section.tl-alt { background: var(--tm-offwhite); }
.tl-section-title {
  font-size: 1.25em;
  margin: 0 0 1.2em;
  display: flex;
  align-items: center;
  gap: .5em;
  color: var(--tm-black);
}
.tl-section-title::before {
  content: "";
  width: .8em;
  height: .8em;
  background: var(--tm-yellow);
  border: 2px solid var(--tm-black);
  flex-shrink: 0;
}
.tl-section-more { text-align: right; margin: 1em 0 0; }
.tl-section-more a {
  font-weight: 700;
  text-decoration: none;
  color: var(--tm-black);
  border-bottom: 2px solid var(--tm-yellow);
  padding-bottom: 2px;
}

/* --- 記事カード --- */
.tl-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tl-post-card {
  background: #fff;
  border: 1px solid var(--tm-gray);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.tl-post-card:hover {
  box-shadow: 0 0 0 2px var(--tm-yellow), 0 6px 16px rgba(0, 0, 0, .08);
}
.tl-post-card a { text-decoration: none; display: block; }
.tl-post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.tl-post-card .tl-body { padding: .9em 1em 1.1em; }
.tl-post-card h3 {
  font-size: .95em;
  margin: .4em 0 .5em;
  line-height: 1.55;
  color: var(--tm-black);
}
.tl-post-meta { font-size: .78em; color: var(--tm-muted); }
.tl-cat-label {
  display: inline-block;
  background: var(--tm-black);
  color: var(--tm-yellow);
  font-size: .72em;
  font-weight: 700;
  padding: .15em .7em;
  border-radius: 3px;
}
.tl-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--tm-offwhite);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tm-gray);
  font-weight: 800;
}
.tl-thumb-placeholder.small {
  width: 110px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

/* --- チケミーCTAバンド --- */
.tl-cta-band {
  background: var(--tm-yellow);
  padding: 2.5em 0;
  text-align: center;
}
.tl-cta-band h2 { margin: 0 0 .3em; font-size: 1.35em; color: var(--tm-black); }
.tl-cta-band p { margin: 0 0 1.2em; color: var(--tm-black); }
.tl-btn-cta {
  display: inline-block;
  background: var(--tm-black);
  color: var(--tm-yellow);
  font-weight: 800;
  font-size: 1.05em;
  padding: .9em 2.4em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .15s;
}
.tl-btn-cta:hover { transform: translateY(-2px); color: var(--tm-yellow); }

/* --- レスポンシブ --- */
@media (max-width: 900px) {
  .tl-hero-grid { grid-template-columns: 1fr; }
  .tl-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tl-post-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   全ページ共通：関連サイト欄
   ===================================================== */
.tm-related-sites {
  background: var(--tm-offwhite);
  border-top: 3px solid var(--tm-yellow);
  padding: 2.5em 1em;
}
.tm-related-sites__inner { max-width: 1100px; margin: 0 auto; }
.tm-related-sites__title {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--tm-black);
  margin: 0 0 1em;
  display: flex;
  align-items: center;
  gap: .5em;
}
.tm-related-sites__title::before {
  content: "";
  display: inline-block;
  width: .8em;
  height: .8em;
  background: var(--tm-yellow);
  border: 2px solid var(--tm-black);
}
.tm-related-sites__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tm-related-sites__list a {
  display: block;
  background: #fff;
  border: 1px solid var(--tm-gray);
  border-radius: 8px;
  padding: 1em 1.2em;
  text-decoration: none;
  color: var(--tm-black);
  transition: box-shadow .2s ease;
}
.tm-related-sites__list a:hover { box-shadow: 0 0 0 2px var(--tm-yellow); }
.tm-related-sites__name { font-weight: 700; display: block; }
.tm-related-sites__desc { font-size: .85em; color: #555; display: block; margin-top: .3em; }
.tm-related-sites__legal {
  margin-top: 1.4em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 1.6em;
  font-size: .88em;
}
.tm-related-sites__legal a { color: var(--tm-black); }

/* =====================================================
   運営者情報ボックス（E-E-A-T・記事末尾に自動表示）
   ===================================================== */
.tl-author-box {
  margin: 2.5em 0;
  border: 2px solid var(--tm-black);
  border-radius: 10px;
  padding: 1.4em 1.6em;
  background: var(--tm-offwhite);
  font-size: .92em;
}
.tl-author-box__label {
  display: inline-block;
  background: var(--tm-black);
  color: var(--tm-yellow);
  font-size: .8em;
  font-weight: 700;
  padding: .2em .9em;
  border-radius: 3px;
  margin: 0 0 .6em;
}
.tl-author-box__name {
  font-weight: 800;
  font-size: 1.05em;
  margin: 0 0 .4em;
  color: var(--tm-black);
}
.tl-author-box__row { display: flex; gap: 1.1em; align-items: flex-start; }
.tl-author-box__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--tm-yellow);
  background: #fff;
  object-fit: contain;
  flex-shrink: 0;
}
.tl-author-box__main { min-width: 0; }
.tl-author-box__bio { margin: 0 0 .6em; line-height: 1.8; }
.tl-author-box__links { margin: 0; font-size: .9em; }
.tl-author-box__links a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--tm-yellow);
}

/* =====================================================
   FAQ（[tl_faq]ショートコード）
   ===================================================== */
.tl-faq { margin: 2.5em 0; }
.tl-faq-heading {
  font-size: 1.25em;
  border-bottom: 4px solid var(--tm-yellow);
  padding-bottom: .4em;
}
.tl-faq-item {
  border: 1px solid var(--tm-gray);
  border-radius: 8px;
  margin-bottom: .8em;
  background: #fff;
}
.tl-faq-q {
  cursor: pointer;
  font-weight: 700;
  padding: 1em 1.2em;
  list-style: none;
  position: relative;
  padding-left: 2.6em;
}
.tl-faq-q::before {
  content: "Q";
  position: absolute;
  left: .9em;
  color: var(--tm-black);
  background: var(--tm-yellow);
  font-weight: 800;
  width: 1.4em;
  height: 1.4em;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85em;
  top: 1.05em;
}
.tl-faq-item[open] .tl-faq-q { border-bottom: 1px dashed var(--tm-gray); }
.tl-faq-a { padding: 1em 1.2em; }

/* =====================================================
   記事ページ等：追従CTA
   PC＝右下フローティングカード / スマホ＝画面下バー
   ===================================================== */
.tl-sticky-cta { position: fixed; z-index: 9999; }
.tl-sticky-cta .tl-sticky-close {
  position: absolute;
  background: none;
  border: none;
  color: var(--tm-gray);
  font-size: 1.3em;
  cursor: pointer;
  line-height: 1;
  padding: .2em;
}
.tl-sticky-cta .tl-sticky-close:hover { color: var(--tm-yellow); }
.tl-sticky-cta .tl-sticky-btn {
  background: var(--tm-yellow);
  color: var(--tm-black);
  font-weight: 800;
  font-size: .9em;
  padding: .55em 1.6em;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

/* --- PC：右下フローティングカード --- */
@media (min-width: 901px) {
  .tl-sticky-cta {
    right: 20px;
    bottom: 20px;
    width: 260px;
    background: var(--tm-black);
    border: 2px solid var(--tm-yellow);
    border-radius: 14px;
    padding: 1.2em 1.2em 1.3em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    text-align: center;
  }
  .tl-sticky-cta p {
    margin: 0 0 .9em;
    color: #fff;
    font-size: .88em;
    font-weight: 600;
    line-height: 1.6;
  }
  .tl-sticky-cta .tl-sticky-btn { display: inline-block; }
  .tl-sticky-cta .tl-sticky-close {
    right: .4em;
    top: .3em;
  }
}

/* --- スマホ・タブレット：画面下バー --- */
@media (max-width: 900px) {
  .tl-sticky-cta {
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tm-black);
    border-top: 3px solid var(--tm-yellow);
    padding: .7em 2.4em .7em 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
  }
  .tl-sticky-cta p {
    margin: 0;
    color: #fff;
    font-size: .82em;
    font-weight: 600;
  }
  .tl-sticky-cta .tl-sticky-close {
    right: .5em;
    top: 50%;
    transform: translateY(-50%);
  }
}
