/* ===================================================================
   GW フッター（2026-09-24）
   出典: 博士の公式/figma-make-src/App.tsx の FOOTER セクション

   🚨 Blocksy の既定フッター（.ct-footer）はここで隠している。
      カスタマイザーは触っていないので、このプラグインを無効化すれば元に戻る。
   =================================================================== */

/* 🚨 Blocksy の既定フッターは display:none で隠す。カスタマイザーは触らない。
      ⚠️ もし Blocksy 側の JS が .ct-footer の中の要素（スクロールトップ等）を
         探してエラーを出すようなら、display:none をやめて
         `position:absolute; width:0; height:0; overflow:hidden` に切り替えること。
         2026-09-24 時点ではコンソールエラーは出ていない。 */
.ct-footer {
    display: none !important;
}

.gw-footer {
    background: #2a2a2a;
    padding: 32px 20px;
    /* 🚨 スマホは下部固定ナビ（gw-menu）が被るので、その分の余白を足す。
       モックの pb-[100px] と同じ意図。
       PC 側の事情は下の @media (min-width:768px) を参照。 */
    padding-bottom: 100px;
}
@media (min-width: 768px) {
    .gw-footer { padding: 40px 20px; }

    /* 🚨 PC も「余白不要」ではない。未ログイン時は gw-um-tweaks の
       #gw-guest-float-bar（position:fixed / 高さ60px）が画面下部に出て、
       フッター最下段（規約リンク・コピーライト）を覆い隠す。
       ログイン済み・×で閉じた後は出ないので、固定で余白を足すと逆に間延びする。
       → バーが実際に表示されている時だけ余白を足す。
         バーは inline style を display:none ⇔ block で切り替えるので、
         :has() + [style*="block"] で「今出ているか」を見る。
         ⚠️ gw-um-tweaks 側の出し方（inline style の切替）に依存している。
            あちらを class 制御に変えるときはここも直すこと。 */
    body:has(#gw-guest-float-bar[style*="block"]) .gw-footer {
        padding-bottom: 100px;
    }
}

.gw-footer__inner {
    max-width: 1152px;   /* モックの max-w-6xl */
    margin: 0 auto;
}

/* ── 上段 ───────────────────────────────────────────────── */
.gw-footer__top { margin-bottom: 12px; }
@media (min-width: 768px) {
    .gw-footer__top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 32px;
        margin-bottom: 32px;
    }
}

.gw-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    text-decoration: none;
    margin-bottom: 12px;
}
@media (min-width: 768px) {
    .gw-footer__brand { justify-content: flex-start; margin-bottom: 0; flex: 0 0 auto; }
}

/* 🚨 ロゴは gw-top-design の SVG をそのまま読んでいる（中で fill="#de4592" が直書き）。
      色を置換せず、モックと同じ filter で白抜きにする。
      ⚠️ ロゴの意匠をこちら側で書き換えないこと。 */
.gw-footer__logo {
    display: block;
    line-height: 0;
}
.gw-footer__logo svg {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* ロゴSVGが読めなかったときの文字版 */
.gw-footer__brandtext { display: flex; flex-direction: column; }
.gw-footer__name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: .3px;
    margin-bottom: 3px;
}
.gw-footer__sub {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .2px;
    line-height: 1.3;
}

/* 🚨 主リンクは**PCのみ**（モック: hidden md:flex）。
      スマホは下部固定ナビとハンバーガーで同じ導線があるので繰り返さない。 */
.gw-footer__main { display: none; }
@media (min-width: 768px) {
    .gw-footer__main {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px 24px;
    }
}
.gw-footer__main a {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    line-height: 1.5;
}
.gw-footer__main a:hover { color: #fff; text-decoration: underline; }

/* ── 下段 ───────────────────────────────────────────────── */
.gw-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
}
@media (min-width: 768px) {
    .gw-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 32px;
    }
}

.gw-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
@media (min-width: 768px) {
    .gw-footer__legal { justify-content: flex-start; }
}
.gw-footer__legal a {
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    line-height: 1.5;
}
.gw-footer__legal a:hover { color: #fff; text-decoration: underline; }

.gw-footer__copy {
    font-size: 11px;
    color: rgba(255, 255, 255, .75);
    margin: 0;
    text-align: center;
}
