@charset "UTF-8";

/* font */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap');

/*-------------------------------------------------
	変数
--------------------------------------------------*/
:root {
  --color-primary: #37853e;
}

/*-------------------------------------------------
	ページ全体
--------------------------------------------------*/
html {
  scroll-behavior: smooth;
  font-size: 16px;
  font-family: 'Noto Sans JP', sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

a:hover,
button:hover {
  opacity: 0.7;
}

button {
  cursor: pointer;
}

input[type='checkbox'],
input[type='radio'] {
  display: none;
}
/*-------------------------------------------------
	base
--------------------------------------------------*/
.base {
  display: flex;
  min-height: 100dvh;
  justify-content: flex-start;
  background: #f9f9f9;
  flex-direction: column;
}

/*-------------------------------------------------
	main
--------------------------------------------------*/
.main {
  color: #242424;
  position: relative;
  z-index: 1;
}

/*-------------------------------------------------
	container
--------------------------------------------------*/

.container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 24px;
  @media (min-width: 769px) {
    padding-inline: 16px;
  }
}

.container__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1240px;
  width: 100%;
  margin-inline: auto;
}

/*-------------------------------------------------
	header
--------------------------------------------------*/
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background-color: #fff;
  border-bottom: 1px solid #e2e8f0;
  gap: 10px;
}

/* Logo */
.header__logo {
  flex-shrink: 0;
}

.header__logo img {
  display: block;
  width: auto;
  height: 32px;
}

/* Title */
.header__ttl {
  font-size: 0.8125rem;
  font-weight: bold;
  color: #242424;
}

/* Button */
.header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--color-primary);
  border-radius: 3px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: bold;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.header__btn:hover {
  background-color: var(--color-primary);
  color: #fff;
}

/*-------------------------------------------------
	main-filter-nav
--------------------------------------------------*/
.main-filter-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-filter-nav__btn {
  position: relative;
  display: block;
  padding: 14px 32px 13px;
  background: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.75rem;
  color: #242424;
  transition: color 0.3s ease;
}

/* active */
.main-filter-nav__btn--active {
  color: #378a40;

  /* 指定の緑色 */
  .main-filter-nav__btn-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 32px;
    width: calc(100% - 64px);
    height: 4px;
    background-color: #378a40;
    /* 指定の緑色 */
  }
}

/* --- Responsive (PC: 769px以上) --- */
@media screen and (min-width: 769px) {
  .main-filter-nav {
    justify-content: center;
  }
}

/* --- Responsive (SP: 768px以下) --- */
@media screen and (max-width: 768px) {
  .main-filter-nav {
    padding: 0 10px;
  }

  .main-filter-nav__btn {
    padding: 14px 22px 13px;
  }

  .main-filter-nav__btn--active .main-filter-nav__btn-inner::after {
    left: 22px;
    width: calc(100% - 44px);
  }
}

/*-------------------------------------------------
	sub-filter-nav
--------------------------------------------------*/
.sub-filter-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-filter-nav__btn-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Base Capsule Button */
.sub-filter-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #999999;
  border-radius: 50px;
  background-color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  color: #242424;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.sub-filter-nav__btn:hover {
  background-color: #f5f5f5;
  border-color: #999;
}

.sub-filter-nav__btn--active[data-filter-sub='メロン'] {
  border-color: #378a40;
  background-color: #378a40;
  color: #fff;
  &:hover {
    border-color: #378a40;
    background-color: #378a40;
  }
}
.sub-filter-nav__btn--active[data-filter-sub='フロマージュ'] {
  border-color: #e92c77;
  background-color: #e92c77;
  color: #fff;
  &:hover {
    border-color: #e92c77;
    background-color: #e92c77;
  }
}
.sub-filter-nav__btn--active[data-filter-sub='Comic+'] {
  border-color: #c57841;
  background-color: #c57841;
  color: #fff;
  &:hover {
    border-color: #c57841;
    background-color: #c57841;
  }
}

.sub-filter-nav__age-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #378a40;
  font-size: 0.8125rem;
  font-weight: bold;
  cursor: pointer;
  padding: 8px 12px;
}

.sub-filter-nav__age-btn::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  background: no-repeat center/contain url(../images/icon-change-arrow.svg);
}

/* --- Responsive (PC: 769px以上) --- */
@media screen and (min-width: 769px) {
  .sub-filter-nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* --- Responsive (SP: 768px以下) --- */
@media screen and (max-width: 768px) {
  .sub-filter-nav {
    padding-inline: 16px;
  }

  .sub-filter-nav__age-btn {
    margin-left: auto;
  }
}

/*-------------------------------------------------
	filter-area
--------------------------------------------------*/
.filter-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/*-------------------------------------------------
	modal
--------------------------------------------------*/

html:has(dialog[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

dialog:has(.modal) {
  padding: 0;
  max-width: 780px;
  width: 100%;
  background: transparent;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s,
    transform 0.5s,
    overlay 1s allow-discrete,
    display 1s allow-discrete;
}

dialog:has(.modal)[open] {
  opacity: 1;
  transform: translateY(0);
}

dialog:has(.modal)::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition:
    opacity 0.5s ease-out,
    overlay 1s allow-discrete,
    display 1s allow-discrete;
}

dialog:has(.modal)[open]::backdrop {
  opacity: 1;
}

.modal {
  border-radius: 0.75rem;
  overflow: hidden;
  max-width: 90vw;
  max-height: 90vh;
  max-height: 90dvh;
  margin-inline: auto;
}

.modal__content {
  background: #fff;
  color: #121212;
  max-height: 90dvh;
  overflow-y: auto;
}

@starting-style {
  dialog:has(.modal)[open] {
    opacity: 0;
    transform: translateY(20px);
  }

  dialog:has(.modal)[open]::backdrop {
    opacity: 0;
  }
}

/* 閉じるボタン */
.modal__close-btn-text {
  display: flex;
  width: fit-content;
  font-size: 0.6875rem;
  margin-inline: auto;
  padding: 8px 12px;
  border: 1px solid #999999;
  font-weight: bold;
  border-radius: 9999px;
  font-weight: 800;
  gap: 6px;
  align-items: center;
  color: #999999;

  &::before {
    content: '';
    display: block;
    width: 1em;
    height: 1em;
    background: no-repeat left center/1em url('../images/icon-close-line.svg');
  }
}

.modal:has(.modal__close-btn) {
  padding-top: 0.375rem;
  padding-right: 0.375rem;
}

.modal__close-btn {
  position: absolute;
  width: 1.875rem;
  height: 1.875rem;
  background: no-repeat center / contain url(../images/icon-calendar-line.svg);
  right: 0;
  top: 0;
  z-index: 1;
}

.modal__close-btn-area {
  position: sticky;
  bottom: 0;
  padding-block: 24px;
  background: #fff;
  border-top: 1px solid #bcbcbc;

  @media (max-width: 768px) {
    padding-block: 16px;
  }
}

/*-------------------------------------------------
	モーダル内クーポン情報 modal-coupon
--------------------------------------------------*/
.modal-coupon {
  display: flex;
  padding: 40px 40px 32px 40px;
  flex-direction: column;
  gap: 32px;
  max-width: 780px;

  @media (max-width: 768px) {
    padding: 20px;
    gap: 24px;
  }
}

/* ヘッダー ------------------------------------------*/
.modal-coupon__header {
  display: grid;
  grid-template-columns: 240px auto;
  gap: 23px 32px;

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.modal-coupon__banner {
  max-width: 240px;

  @media (max-width: 768px) {
    max-width: none;
  }
}

.modal-coupon__detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-coupon__ttl {
  color: #0f172a;
  font-weight: 800;
  font-size: 1.25rem;
}

.modal-coupon__detail-text {
  color: #444955;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 130%;
}

/* ボタン ------------------------------------------*/

.modal-coupon__btn-area {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  @media (min-width: 769px) {
    grid-column: 2 span;
  }
}

.modal-coupon__btn {
  display: flex;
  text-align: center;
  width: fit-content;
  min-height: 42px;
  padding: 14px 20px 14px 32px;
  justify-content: center;
  align-items: center;
  border-radius: 9999px;
  background: #37853e;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 800;
  gap: 0.8em;
  &::after {
    content: '';
    display: block;
    width: 1em;
    aspect-ratio: 1/1;
    background: #fff;
    mask-image: url(../images/icon-arrow-right.svg);
    mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
  }
}

/* 情報 ------------------------------------------*/
.modal-coupon__info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  @media (max-width: 768px) {
    border-top: 1px solid #e2e8f0;
    padding-top: 32px;
  }
}

.modal-coupon__info-item--border-bottom {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 32px;
}

.modal-coupon__info-item {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-coupon__info-header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
}

.modal-coupon__info-ttl {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

/* リンクリスト ------------------------------------------*/
.modal-coupon__link-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

/*-------------------------------------------------
	クーポンリスト
--------------------------------------------------*/

/* 変数 ------------------------------------------*/
:root {
  --fair-text-color: #242424;
  --fair-end-color: #888888;
  --badge-bg-color-new: #ff0000;
  --badge-text-color-new: #fff;
  --badge-bg-color-update: #1a2beb;
  --badge-text-color-update: #fff;
  --badge-bg-color-end-up-close: #ffcc00;
  --badge-text-color-end-up-close: #300505;
  --tag-color: #242424;
  --tag-color-melon: #37853e;
  --tag-color-comic-plus: #914a17;
  --tag-color-froma: #da0078;
  --tag-color-other: #242424;
}

/* リスト ----------------------------------- */

.coupon-list {
  display: grid;
}

@media (min-width: 769px) {
  .coupon-list {
    grid-template-columns: repeat(auto-fill, minmax(min(calc((100% - 24px) / 3), 292px), 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .coupon-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 16px;
    padding-inline: 16px;
  }
}

/* 一致する条件が無かった時のメッセージ表示時 */
.coupon-list:has(.empty-message) {
  grid-template-columns: 1fr;
}

/* カード -------------------------- */
.filter-item {
  background: #ffffff;
  border-radius: 12px;
  color: var(--fair-text-color);
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.16);
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 4 span;
  gap: 12px;
  padding-bottom: 12px;
  position: relative;
}

.filter-item--new::after {
  content: '新着';
  background: var(--badge-bg-color-new);
  color: var(--badge-text-color-new);
}

.filter-item--update::after {
  content: '更新';
  background: var(--badge-bg-color-update);
  color: var(--badge-text-color-update);
}

.filter-item--end-up-close::after {
  content: '終了間近';
  background: var(--badge-bg-color-end-up-close);
  color: var(--badge-text-color-end-up-close);
}

.filter-item--new,
.filter-item--update,
.filter-item--end-up-close {
  &::after {
    position: absolute;
    top: -0.3rem;
    left: -0.3rem;
    display: flex;
    padding: 0.375rem;
    justify-content: center;
    align-items: center;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 100%;
    border-radius: 999px;
    z-index: 2;
  }
}

/* 終了 */
.filter-item--end {
  --fair-text-color: var(--fair-end-color);
  --tag-color: var(--fair-end-color);
  --tag-color-melon: var(--fair-end-color);
  --tag-color-comic-plus: var(--fair-end-color);
  --tag-color-froma: var(--fair-end-color);
  --tag-color-other: var(--fair-end-color);
  pointer-events: none;
}

.filter-item__banner {
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
  aspect-ratio: 632 / 340;
  position: relative;
  z-index: 1;
}

.filter-item__banner-bg {
  display: block;
  position: absolute;
  top: -10%;
  left: -10%;
  height: 120%;
  width: 120%;
  z-index: -1;
  filter: blur(5px) opacity(0.5);
}

.filter-item__banner-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.filter-item__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.filter-item__ttl,
.filter-item__date,
.fair-tag-list {
  padding-inline: 0.75rem;
}

.filter-item__ttl {
  height: 2.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  align-self: stretch;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 130%;
}

.filter-item__date {
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 100%;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;

  &::before {
    content: '';
    background: var(--fair-text-color);
    width: 1em;
    height: 1em;
    -webkit-mask-image: url('../images/icon-calendar-line.svg');
    mask-image: url('../images/icon-calendar-line.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
  }
}

/* タグリスト */
.fair-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-content: flex-start;
}

.fair-tag {
  color: var(--tag-color);
  display: flex;
  min-height: 1.375rem;
  padding: 0.375rem;
  justify-content: center;
  align-items: center;
  border-radius: 0.1875rem;
  border: 1px solid;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 100%;
}

.fair-tag--melon {
  color: var(--tag-color-melon);
}

.fair-tag--comic-plus {
  color: var(--tag-color-comic-plus);
}

.fair-tag--froma {
  color: var(--tag-color-froma);
}

.fair-tag--other {
  color: var(--tag-color-other);
}

/*-------------------------------------------------
	さらに表示ボタン filter-more-btn
--------------------------------------------------*/
.filter-more-btn {
  display: flex;
  width: 83%;
  max-width: 900px;
  min-height: 46px;
  margin-inline: auto;
  padding: 16px calc(16px * 3) 16px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2%;
  position: relative;
}

.filter-more-btn::after {
  content: '';
  display: block;
  position: absolute;
  width: 1em;
  height: 1em;
  top: calc(50% - 0.5em);
  right: 16px;
  background: no-repeat center/contain url(../images/icon-arrow-bottom.svg);
}

/* 閉じるボタンの場合 */
.filter-more-btn--close::after {
  transform: scaleY(-1);
}

/*-------------------------------------------------
	リンク表示エリア link-area
--------------------------------------------------*/
.link-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 24px;
}

/*-------------------------------------------------
	リンクバナー一覧 link-banner-list
--------------------------------------------------*/
.link-banner-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;

  @media (max-width: 768px) {
    padding-inline: 24px;
  }
}

/*-------------------------------------------------
	リンクバナー link-banner
--------------------------------------------------*/
.link-banner {
  max-width: 320px;
}

/*-------------------------------------------------
	リンクボタン一覧 link-btn-list
--------------------------------------------------*/
.link-btn-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  gap: 16px;

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
    padding-inline: 14px;
    justify-items: center;
  }
}

/*-------------------------------------------------
	リンクボタン link-btn-list
--------------------------------------------------*/
.link-btn {
  display: flex;
  height: 62px;
  width: 100%;
  background: #fff;
  padding: 12px;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--color-primary);
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.16);
}

.link-btn--bg-secondary {
  background:
    no-repeat center left 15% / auto 100% url(../images/character-melon.webp),
    #fff;
}

.link-btn__logo {
  flex: 1;
  max-height: 100%;
  aspect-ratio: 184/32;

  img {
    height: 100%;
    width: 100%;
    object-position: center;
    object-fit: contain;
  }
}

.link-btn--comic-plus .link-btn__logo {
  aspect-ratio: 184/14;
}

.link-btn__btn {
  display: flex;
  padding: 12px 6px 12px 12px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  background: #e6f5e4;
  color: var(--color-primary);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
}

.link-btn__btn::after {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  background: no-repeat center/contain url(../images/icon-arrow-right.svg);
}

/*-------------------------------------------------
	ヘルプリンク help-link
--------------------------------------------------*/
.help-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  color: #378a40;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration-line: underline;
}

.help-link::before {
  content: '';
  display: block;
  width: 13px;
  height: 13px;
  background: no-repeat center/ contain url(../images/icon-question.svg);
}

/*-------------------------------------------------
	クーポンコード一覧 code-list
--------------------------------------------------*/
.code-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

/*-------------------------------------------------
	クーポンコード coupon-code
--------------------------------------------------*/
.coupon-code {
  display: flex;
  padding: 12px;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid #b9dbbc;
  background: #ecf7ed;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
}
.coupon-code__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coupon-code__ttl {
  color: #cf0000;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
}
.coupon-code__ttl-unit {
  font-size: 0.8125rem;
}
.coupon-code__detail {
  color: #313a51;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
}
.coupon-code__btn {
  display: flex;
  padding: 12px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  background: #37853e;
  color: #ffffff;
  min-height: 38px;
  font-weight: 800;
  font-size: 0.8125rem;
  flex: 0 0 auto;
}

.coupon-code__btn::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  background: no-repeat center/contain url(../images/icon-copy.svg);
}

/*-------------------------------------------------
	日付表記 date-notation
--------------------------------------------------*/
.date-notation {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #333;
  font-size: 0.8125rem;
  font-weight: 600;
}

.date-notation::before {
  content: '';
  display: block;
  width: 13px;
  height: 13px;
  background: no-repeat center/contain url(../images/icon-calendar-line.svg);
}

/*-------------------------------------------------
	注意書きリスト attention-list
--------------------------------------------------*/
.attention-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #444955;
  font-size: 0.6875rem;
  font-weight: 400;
}
.attention-list--color-secondary {
  color: #0f172a;
}

.attention-list__item {
  display: flex;
}

.attention-list__item::before {
  content: '※';
}

/*-------------------------------------------------
	コピートースト copy-toast
--------------------------------------------------*/
.copy-toast {
  position: fixed;
  top: calc(50% - 22px);
  width: 100%;
  max-width: 100%;
  display: flex;
  height: 44px;
  justify-content: center;
  align-items: center;
  background: rgba(55, 133, 62, 0.8);
  color: #fff;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  transition: all 0.5s;
  z-index: 9999;
  margin: 0;
  overflow-y: hidden;
  max-width: none;
  pointer-events: none;
}

dialog.copy-toast[open] {
  opacity: 1;
  visibility: visible;
}

dialog.copy-toast::backdrop {
  background: transparent;
}

@starting-style {
  dialog.copy-toast[open] {
    opacity: 0;
  }
}

/*-------------------------------------------------
	レスポンシブ対応
--------------------------------------------------*/
@media (min-width: 769px) {
  .sp {
    display: none;
  }
}

@media (max-width: 768px) {
  .pc {
    display: none;
  }
}
