/* eスポーツ事業ページ — 旧ペライチ版 melm.info のトレース */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  color: #fff;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
/* アイコン定義用の SVG（<symbol> 置き場）。display:none だと <use> が描画されない環境があるため 0 サイズで隠す */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: inherit; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 999;
  display: flex; justify-content: space-between; align-items: center;
  height: 70px; padding: 0 20px;
  background: rgba(29, 26, 23, 0.82); /* 白文字のコントラスト確保（旧版は 0.4 で 2.5:1 だった） */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header__logo img { height: 30px; width: auto; }
.header__nav { display: flex; gap: 20px; }
.header__nav a { color: #fff; text-decoration: none; font-size: 14px; }
.header__nav a:hover { text-decoration: underline; }
.header__toggle { display: none; }

@media (max-width: 768px) {
  html { scroll-padding-top: 45px; }
  .header { height: 45px; padding: 0 15px; }
  .header__logo img { height: 24px; }
  .header__toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 30px; height: 22px; padding: 0;
    background: none; border: 0; cursor: pointer;
  }
  .header__toggle span { height: 4px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
  .header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  .header__nav {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; width: 100%;
    padding: 20px; background: rgba(0, 0, 0, 0.8);
  }
  .header__nav.is-open { display: flex; }
  .header__nav a { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
}

/* ---------- KV ---------- */
.kv { position: relative; margin: 70px 0 0; }
.kv img { width: 100%; }
/* キャッチコピーは KV 画像に入っているため、見出しは読み上げ・検索用に視覚的に隠す */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 768px) { .kv { margin-top: 45px; } }

/* ---------- Sponsor marquee ---------- */
.marquee { overflow: hidden; background: #eee; }
.marquee__track { display: flex; width: max-content; animation: marquee 53s linear infinite; /* 1セット12ロゴ。旧版(9ロゴ/40s)と同じ流れる速さ */ }
.marquee__set { display: flex; align-items: center; }
.marquee__set img { width: 300px; height: 100px; object-fit: contain; margin-right: 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 768px) {
  .marquee__set img { width: 100px; height: 40px; margin-right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Section 共通 ---------- */
.section { padding: 40px 20px; text-align: center; }
.section__title {
  display: inline-block; margin: 0 0 40px; padding-bottom: 5px;
  font-size: 44px; font-weight: 400; letter-spacing: 2px; line-height: 1.2;
  border-bottom: 2px solid currentColor;
}
@media (max-width: 768px) { .section__title { font-size: 24px; margin-bottom: 20px; } }

.fade { opacity: 0; transform: translateY(20px); transition: opacity 1s ease-out, transform 1s ease-out; }
.fade.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1; transform: none; transition: none; } }

/* ---------- ABOUT ---------- */
/* PC: 写真（左）｜縦書きキャッチ｜本文 の3カラム。SP: キャッチ → 写真 → 本文 */
.about { background: #1c1c1c; padding-bottom: 80px; }
.about__body {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr);
  align-items: center; gap: 44px; text-align: left;
}
.about__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.about__catch {
  margin: 0; align-self: stretch; display: flex; justify-content: center;
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 40px; font-weight: 700; letter-spacing: .12em; line-height: 1.5;
}
.about__text { margin: 0; font-size: 16px; line-height: 2.1; }
@media (max-width: 1000px) {
  .about__body { grid-template-columns: auto minmax(0, 1fr); gap: 32px 36px; }
  .about__img { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .about { padding-bottom: 48px; }
  .about__body { display: flex; flex-direction: column; gap: 20px; }
  .about__catch { order: -1; writing-mode: horizontal-tb; align-self: auto; justify-content: flex-start; font-size: 24px; letter-spacing: .08em; }
  .about__catch br { display: none; }
  .about__text { font-size: 15px; line-height: 1.9; }
}

/* ---------- BUSINESS（チーム運営 / スタジオ運営 / EC）---------- */
.business { background: #0F0F0F; padding-bottom: 80px; }
.biz { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left; }
.biz-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 48px 28px 28px; border-radius: 12px;
  background: #1a1a1a; box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  transition: opacity 1s ease-out, transform .3s ease, box-shadow .3s ease;
}
.biz-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(255, 255, 255, .15); }
.biz-card__ribbon {
  position: absolute; top: 4px; left: -38px;
  width: 130px; padding: 6px 0; transform: rotate(-45deg);
  font-size: 13px; font-weight: 700; text-align: center;
}
.biz-card--team .biz-card__ribbon { background: #ff3c3c; color: #fff; }
.biz-card--studio .biz-card__ribbon { background: #00d1ff; color: #000; }
.biz-card--store .biz-card__ribbon { background: #ffe600; color: #000; }
.biz-card h3 { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.biz-card p { margin: 0; font-size: 16px; line-height: 1.8; color: #e6e6e6; }
.biz-card__status, .biz-card__link {
  margin-top: auto !important; padding-top: 20px;
  font-size: 14px; font-weight: 700;
}
.biz-card__status { color: #00d1ff !important; }
.biz-card--store .biz-card__status { color: #ffe600 !important; }
.biz-card__link { color: #ff6b6b; text-decoration: none; }
.biz-card__link:hover { text-decoration: underline; }
@media (max-width: 900px) { .biz { grid-template-columns: 1fr; max-width: 640px; gap: 20px; } }
@media (max-width: 768px) {
  .business { padding-bottom: 48px; }
  .biz-card { padding: 44px 22px 22px; }
  .biz-card h3 { font-size: 19px; }
  .biz-card p { font-size: 15px; }
}

/* ---------- TEAM ---------- */
.team { background: #1c1c1c; padding-bottom: 80px; }
.team__intro { max-width: 800px; margin: 0 auto; }
.team__name { margin: 0; font-family: "Anton", "Impact", sans-serif; font-size: 56px; line-height: 1.1; letter-spacing: .02em; color: #0e86c8; }
.team__text { margin: 16px 0 0; font-size: 16px; line-height: 1.9; }
.team__sponsor { margin: 12px 0 0; font-size: 15px; color: #d0d0d0; }
.team__sponsor > div { display: flex; justify-content: center; gap: 12px; }
.team__sponsor dd { margin: 0; color: #fff; }
.team__sponsor-list { margin-top: 16px; flex-direction: column; align-items: center; gap: 6px !important; }
.team__sponsor-list ul { display: flex; flex-direction: column; gap: 2px; line-height: 1.7; }
.team__sns {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  padding: 8px 20px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px;
  font-size: 14px; text-decoration: none; transition: background .2s, color .2s;
}
.team__sns svg { width: 14px; height: 14px; }
.team__sns:hover { background: #fff; color: #0F0F0F; }
.team__sub { margin: 64px 0 24px; font-family: "Anton", "Impact", sans-serif; font-weight: 400; font-size: 22px; letter-spacing: .12em; color: #aaa; }
.members { max-width: 1000px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; --cols: 5; } /* 端数の段も中央揃え */
.member {
  flex: 0 0 calc((100% - (var(--cols) - 1) * 16px) / var(--cols));
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0 0 22px; overflow: hidden; border-radius: 12px; border-top: 3px solid #0e86c8;
  background: #262626; box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
/* カード上部（写真・名前・役割）がプロフィールを開くボタン */
.member__open {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
}
.member__open:focus-visible { outline: 2px solid #00d1ff; outline-offset: 4px; }
.member__photo-wrap { display: block; width: 100%; margin-bottom: 6px; overflow: hidden; }
.member__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.member__open:hover .member__photo { transform: scale(1.04); }
.member__more { font-size: 12px; color: #9fd3f0; letter-spacing: .04em; }
.member__more::after { content: " ›"; }
.member__open:hover .member__more { color: #fff; }
.member__name { font-family: "Anton", "Impact", sans-serif; font-size: 30px; line-height: 1.1; letter-spacing: .03em; }
.member__role { font-size: 13px; color: #d6d6d6; line-height: 1.5; }
.member__x {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  font-size: 13px; color: #9fd3f0; text-decoration: none; overflow-wrap: anywhere;
}
.member__x svg { width: 11px; height: 11px; flex: none; }
.member__x:hover { color: #fff; text-decoration: underline; }
@media (max-width: 900px) { .members { --cols: 3; } }
@media (max-width: 768px) {
  .team { padding-bottom: 48px; }
  .team__name { font-size: 36px; }
  .team__text { font-size: 15px; text-align: left; }
  .team__sponsor { font-size: 13px; }
  .team__sub { margin-top: 44px; font-size: 18px; }
  .members { --cols: 2; }
  /* スマホのみ並び順を変更: Yuu・NOBI / TAKE・Ryuichi / Haru */
  .member--yuu { order: 1; } .member--nobi { order: 2; } .member--take { order: 3; } .member--ryuichi { order: 4; } .member--haru { order: 5; }
  .member { padding: 0 0 16px; }
  .member__name { font-size: 24px; }
}

/* ---------- メンバープロフィール（ダイアログ） ---------- */
/* PC: 画面中央のウィンドウ / SP: 下からせり上がるシート。開いている間は背後のスクロールを止める */
html:has(.profile[open]) { overflow: hidden; }
.profile {
  width: min(820px, calc(100vw - 40px)); max-height: calc(100dvh - 40px);
  padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: #1c1c1c; color: #fff; text-align: left;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.profile::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.profile[open] { animation: profile-in .22s ease-out; }
.profile[open]::backdrop { animation: fadein .22s ease-out; }
@keyframes profile-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.profile__panel { position: relative; display: flex; flex-direction: column; max-height: inherit; }
.profile__body { display: grid; grid-template-columns: 280px 1fr; overflow-y: auto; overscroll-behavior: contain; }
.profile__photo { width: 100%; height: 100%; min-height: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-top: 3px solid #0e86c8; }
.profile__info { padding: 32px 32px 24px; }
.profile__role { margin: 0; font-size: 13px; color: #9fd3f0; letter-spacing: .06em; }
.profile__name { margin: 2px 0 18px; font-family: "Anton", "Impact", sans-serif; font-weight: 400; font-size: 44px; line-height: 1.1; }
.profile__facts { margin: 0 0 20px; border-top: 1px solid #333; }
.profile__facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid #333; font-size: 15px; }
.profile__facts dt { color: #bbb; font-size: 13px; padding-top: 2px; }
.profile__facts dd { margin: 0; }
.profile__label { margin: 0 0 8px; font-size: 13px; color: #bbb; }
.profile__results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.profile__results li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.5; }
.profile__year { font-family: "Anton", "Impact", sans-serif; color: #a8a8a8; letter-spacing: .04em; }
.profile__results strong { color: #ffe600; font-weight: 700; white-space: nowrap; }
.profile__sns { display: flex; flex-wrap: wrap; gap: 8px; }
.profile__sns a {
  display: inline-block; padding: 6px 16px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  font-size: 13px; text-decoration: none; transition: background .2s, color .2s;
}
.profile__sns a:hover { background: #fff; color: #1c1c1c; }
.profile__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 24px; line-height: 1;
}
.profile__close:hover { background: #0e86c8; }
.profile__nav { display: flex; justify-content: space-between; border-top: 1px solid #333; background: #161616; }
.profile__step {
  flex: 1; padding: 14px 20px; border: 0; background: none; color: #ccc; cursor: pointer;
  font: inherit; font-size: 13px; text-align: left;
}
.profile__step + .profile__step { text-align: right; border-left: 1px solid #333; }
.profile__step:hover { color: #fff; background: #222; }
.profile__step-name { font-family: "Anton", "Impact", sans-serif; letter-spacing: .04em; font-size: 15px; }
.profile__close-sp { display: none; }
.profile button:focus-visible, .profile a:focus-visible { outline: 2px solid #00d1ff; outline-offset: 2px; }

@media (max-width: 768px) {
  .profile {
    width: 100vw; max-width: 100vw; max-height: 88dvh;
    margin: auto 0 0; border-radius: 16px 16px 0 0;
  }
  .profile[open] { animation: sheet-in .25s ease-out; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  /* 写真と（役割・名前）を1行目に横並び、以降は全幅。行をまたぐ配置は Safari で重なるため使わない */
  .profile__body { grid-template-columns: 132px 1fr; align-items: center; }
  .profile__photo { grid-column: 1; grid-row: 1; width: 112px; height: 140px; min-height: 0; aspect-ratio: auto; margin: 20px 0 0 20px; border-radius: 8px; border-top: 0; } /* 高さを明示（Safari は差し込み直後の画像の高さを行に反映しない） */
  .profile__info { display: contents; }
  .profile__head { grid-column: 2; grid-row: 1; padding: 20px 52px 0 16px; }
  .profile__name { font-size: 30px; margin-bottom: 0; }
  .profile__facts, .profile__label, .profile__results, .profile__sns { grid-column: 1 / -1; }
  .profile__facts { margin: 16px 20px 16px; }
  .profile__facts > div { grid-template-columns: 116px 1fr; }
  .profile__label { margin: 0 20px 8px; }
  .profile__results { margin: 0 20px 18px; }
  .profile__sns { margin: 0 20px 20px; }
  .profile__close-sp {
    display: block; padding: 14px; border: 0; border-top: 1px solid #333;
    background: #1c1c1c; color: #fff; font: inherit; font-size: 14px; cursor: pointer;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .profile[open], .profile[open]::backdrop { animation: none; }
}

/* ---------- NEWS ---------- */
.news { background: #EFE4CB; color: #1D1A17; padding-top: 60px; }
.news__page { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.news__page[hidden] { display: none; }
.news__page { animation: fadein .5s ease; }
@keyframes fadein { from { opacity: 0; } }
.news-card {
  width: 22%; padding: 10px; border-radius: 8px;
  background: #1D1A17; color: #fff; text-align: left;
  transition: transform .3s ease, box-shadow .3s ease;
}
.news-card:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 8px 16px rgba(255, 255, 255, .2); }
.news-card time { display: block; margin-bottom: 8px; font-size: 17.5px; color: #ccc; }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.news-card p { margin: 8px 0 0; font-size: 19px; line-height: 1.6; }
@media (max-width: 1024px) { .news-card { width: 45%; } }
@media (max-width: 640px) { .news-card { width: 90%; } .news-card p { font-size: 16px; } .news-card time { font-size: 15px; } }

.news__pager { display: flex; justify-content: center; gap: 20px; margin-top: 24px; }
.news__pager button {
  padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; color: #1D1A17; text-decoration: underline;
}
.news__pager button:disabled { opacity: .35; cursor: default; }

/* ---------- PARTNERS ---------- */
.partners { background: #EFE4CB; color: #1D1A17; }
.partners__logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; max-width: 810px; margin: 0 auto; } /* 4 + 3 の2段で中央揃え */
.partners__logos img { width: 180px; transition: transform .3s ease, filter .3s ease, box-shadow .3s ease; }
.partners__logos img:hover { transform: scale(1.05); filter: brightness(1.15); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
@media (max-width: 768px) {
  .partners__logos { flex-direction: column; gap: 20px; }
  .partners__logos img { width: 60vw; margin: 0 auto; }
}

/* ---------- Footer ---------- */
.footer { background: #000; padding: 40px 20px 80px; }
.footer__inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer__logo img { height: 40px; width: auto; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.footer__nav a { text-decoration: none; font-size: 14px; }
.footer__nav a:hover { text-decoration: underline; }
.footer__copy { margin: 0; font-size: 13px; }
@media (max-width: 768px) {
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__logo img { height: 32px; }
  .footer__copy { margin-top: 10px; font-size: 12px; }
}
