/* 集客機能（特集・フォトコンテスト・スタンプラリー・シェア）。tp.css の変数を使う */

/* ボタン */
.gr-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 999px; border: 0; font-weight: 800; font-size: 14px; color: #fff !important; background: var(--tp-accent, #1f7a5a); cursor: pointer; text-decoration: none !important; }
.gr-btn:hover { filter: brightness(1.08); }
.gr-btn:disabled { opacity: .6; cursor: default; }
.gr-btn--ghost { color: var(--tp-accent, #1f7a5a) !important; background: transparent; box-shadow: inset 0 0 0 2px var(--tp-accent, #1f7a5a); }
.gr-btn--sm { padding: 6px 14px; font-size: 13px; }

/* タブ（月・地区） */
.gr-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 0 6px; }
.gr-tab { flex: none; display: inline-flex; align-items: baseline; gap: 5px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--tp-ink, #1d2a26) !important; background: var(--tp-card, #fff); box-shadow: 0 2px 8px rgba(10, 30, 22, .08); text-decoration: none !important; }
.gr-tab small { font-size: 11px; color: var(--tp-sub, #5c6b66); }
.gr-tab.is-active { color: #fff !important; background: var(--tp-accent, #1f7a5a); }
.gr-tab.is-active small { color: rgba(255, 255, 255, .8); }
.gr-tab.is-empty { opacity: .5; }

.gr-intro h2 { font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.gr-intro p { line-height: 1.9; margin: 0; }

/* 月カード */
.gr-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gr-month { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--tp-radius, 16px); background: var(--tp-card, #fff); box-shadow: var(--tp-shadow); color: var(--tp-ink, #1d2a26) !important; text-decoration: none !important; }
.gr-month b { font-size: 28px; font-weight: 800; line-height: 1; }
.gr-month b small { font-size: 14px; margin-left: 2px; }
.gr-month__topic { font-weight: 800; color: var(--tp-accent, #1f7a5a); }
.gr-month__mood { font-size: 12.5px; color: var(--tp-sub, #5c6b66); line-height: 1.7; }
.gr-month em { position: absolute; right: 16px; top: 16px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--tp-sub, #5c6b66); }
.gr-month.is-now { box-shadow: inset 0 0 0 3px var(--tp-hot, #ff6b3d), var(--tp-shadow); }

/* 月×地区の表 */
.gr-table-wrap { overflow-x: auto; }
.gr-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.gr-table th, .gr-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--tp-line, rgba(0, 0, 0, .1)); }
.gr-table tbody th { text-align: left; font-weight: 700; }
.gr-table .is-now { background: rgba(255, 107, 61, .08); }
.gr-table a { font-weight: 800; color: var(--tp-accent, #1f7a5a) !important; }

/* CTA・シェア */
.gr-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 22px 0; }
.gr-cta h2 { font-size: 17px; font-weight: 800; margin: 0 0 4px; }
.gr-cta p { margin: 0; color: var(--tp-sub, #5c6b66); }
.gr-cta__btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.gr-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.gr-share > span { font-weight: 800; margin-right: 6px; }
.gr-share--side { margin-top: 0; }
.gr-share--side > span { width: 100%; }
.gr-share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--tp-ink, #1d2a26) !important; background: var(--tp-soft, #f3f6f5); cursor: pointer; text-decoration: none !important; }
.gr-share__btn--x { color: #fff !important; background: #111; }
.gr-share__btn--line { color: #fff !important; background: #06c755; }
.gr-share__contest { width: 100%; margin: 4px 0 0; }
.gr-share__contest .gr-share__btn { color: #fff !important; background: var(--tp-hot, #ff6b3d); }
.gr-contest-check { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 10px; font-size: 12.5px; font-weight: 700; vertical-align: middle; cursor: pointer; }

/* フォトコンテスト */
.gr-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: gr; }
.gr-steps li { position: relative; padding: 18px 18px 16px; border-radius: var(--tp-radius, 16px); background: var(--tp-card, #fff); box-shadow: var(--tp-shadow); }
.gr-steps .fa { font-size: 22px; color: var(--tp-accent, #1f7a5a); }
.gr-steps b { display: block; margin: 6px 0 4px; font-size: 16px; }
.gr-steps p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--tp-sub, #5c6b66); }
.gr-prize { margin: 12px 0 0; padding: 12px 18px; font-weight: 700; }
.gr-prize .fa { color: var(--tp-hot, #ff6b3d); }

.gr-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gr-mine__item { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: #e4ebe8; }
.gr-mine__item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gr-mine__item button { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: var(--tp-hot, #ff6b3d); cursor: pointer; }
.gr-mine__note { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .55); }

.gr-winners { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.gr-winner { position: relative; display: block; border-radius: var(--tp-radius, 16px); overflow: hidden; background: #e4ebe8; min-height: 180px; color: #fff !important; text-decoration: none !important; }
.gr-winner:first-child { grid-row: span 2; min-height: 380px; }
.gr-winner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gr-winner__rank { position: absolute; left: 12px; top: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 800; color: #1d2a26; background: #fff; }
.gr-winner--gold .gr-winner__rank { background: #f5c542; }
.gr-winner--silver .gr-winner__rank { background: #d9dee3; }
.gr-winner--bronze .gr-winner__rank { background: #e0a46e; }
.gr-winner__body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.gr-winner__body b { font-size: 16px; }
.gr-winner__body small { font-size: 12px; opacity: .9; }

.gr-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gr-entry { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #e4ebe8; color: #fff !important; text-decoration: none !important; }
.gr-entry img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .4s; }
.gr-entry:hover img { transform: scale(1.06); }
.gr-entry__rank { position: absolute; left: 8px; top: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #1d2a26; background: rgba(255, 255, 255, .92); }
.gr-entry__meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.gr-entry__meta b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-entry__meta small { font-size: 11px; opacity: .9; }

.gr-past { display: flex; gap: 8px; flex-wrap: wrap; }
.gr-past__item { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 12px; background: var(--tp-soft, #f3f6f5); color: var(--tp-ink, #1d2a26) !important; text-decoration: none !important; }
.gr-past__item small { font-size: 11px; color: var(--tp-sub, #5c6b66); }
.gr-past__item.is-active { box-shadow: inset 0 0 0 2px var(--tp-accent, #1f7a5a); }

/* スタンプラリー */
.gr-rallies { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gr-progress { display: block; height: 8px; border-radius: 999px; background: var(--tp-soft, #f3f6f5); overflow: hidden; }
.gr-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--tp-accent-2, #2fae7f), var(--tp-accent, #1f7a5a)); }
.gr-progress--lg { height: 12px; margin-bottom: 8px; }
.gr-done { color: var(--tp-hot, #ff6b3d); font-weight: 800; }

.gr-rally-status { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.gr-rally-status__count { flex: none; font-size: 18px; font-weight: 700; text-align: center; }
.gr-rally-status__count b { font-size: 42px; font-weight: 800; color: var(--tp-accent, #1f7a5a); }
.gr-rally-status__count small { display: block; font-size: 11px; color: var(--tp-sub, #5c6b66); }
.gr-rally-status__body { flex: 1; min-width: 0; }
.gr-rally-status__body p { margin: 0; line-height: 1.8; }
.gr-rally-status.is-complete { box-shadow: inset 0 0 0 3px var(--tp-gold, #f5b301), var(--tp-shadow); }
.gr-rally-status.is-complete .fa-trophy { color: var(--tp-gold, #f5b301); }

.gr-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gr-stop { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--tp-radius, 16px); background: var(--tp-card, #fff); box-shadow: var(--tp-shadow); }
.gr-stop__no { flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--tp-accent, #1f7a5a); box-shadow: inset 0 0 0 2px var(--tp-accent, #1f7a5a); }
.gr-stop.is-stamped .gr-stop__no { color: #fff; background: var(--tp-accent, #1f7a5a); }
.gr-stop__img { flex: none; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #e4ebe8; color: #9fb3ab !important; font-size: 26px; }
.gr-stop__img img { width: 100%; height: 100%; object-fit: cover; }
.gr-stop__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gr-stop__body b { font-size: 15px; color: var(--tp-ink, #1d2a26); }
.gr-stop__body small { font-size: 12px; color: var(--tp-sub, #5c6b66); }
.gr-stop__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.gr-stop__msg { margin: 4px 0 0; font-size: 12.5px; color: var(--tp-hot, #ff6b3d); }
.gr-stop__msg:empty { display: none; }
.gr-stamp { font-size: 13px; font-weight: 800; color: var(--tp-accent, #1f7a5a); }

/* トップページのバナー */
.gr-banners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gr-banner { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--tp-radius, 16px); color: #fff !important; text-decoration: none !important; box-shadow: var(--tp-shadow); }
.gr-banner .fa { font-size: 26px; }
.gr-banner b { font-size: 18px; font-weight: 800; }
.gr-banner span { font-size: 13px; line-height: 1.7; opacity: .92; }
.gr-banner--contest { background: linear-gradient(135deg, #ff8a3d, #e5486d); }
.gr-banner--rally { background: linear-gradient(135deg, #2fae7f, #1f6f7a); }
.gr-banner--feature { background: linear-gradient(135deg, #6a7bd8, #3d4fa8); }

@media (max-width: 767px) {
  .gr-steps { grid-template-columns: 1fr; }
  .gr-winners { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gr-winner:first-child { grid-column: span 2; grid-row: auto; min-height: 260px; }
  .gr-banners { grid-template-columns: 1fr; }
  .gr-rally-status { flex-direction: column; align-items: stretch; gap: 10px; }
  .gr-stop { align-items: flex-start; }
  .gr-stop__img { width: 72px; height: 56px; }
  .gr-contest-check { display: flex; margin: 8px 0 0; }
}
