@charset "UTF-8";
/* ファイル名: style_base.css */
/* 役割: 基本設定、変数の定義、レイアウトの骨格 */

:root {
    --bg-main: #0f1f33;      /* 背景色: 深い夜 */
    --bg-panel: #1a2a3a;     /* パネル色 */
    --text-main: #ffffff;
    --text-sub: #8899aa;
    
    --accent-cyan: #28a0dc;
    --accent-orange: #ff6633;
    
    --header-height: 50px;
    --nav-height: 70px;
    
    --z-page: 1;
    --z-header: 100;
    --z-nav: 100;
    --z-overlay: 2000;
    --z-notification: 3000;
    --z-loading: 9999;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden; /* SPAのためスクロールは内部コンテナで制御 */
    height: 100svh;
    width: 100vw;
}

/* アプリのメインコンテナ */
#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ヘッダー */
#global-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background: rgba(15, 31, 51, 0.9);
    z-index: var(--z-header);
}

/* ロゴ画像の設定 */
.header-logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}
.header-logo-img {
    height: 30px; /* 高さを指定して表示を確実に */
    width: auto;
}

/* タイトルとCopyrightの配置エリア */
.header-title-area {
    position: absolute; /* 画面中央に固定 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* 下の要素のクリックを邪魔しない */
}

.header-title {
    font-size: 1rem;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    pointer-events: auto;
}

/* ポエム画面がアクティブな時のみ付与する静的な発光クラス */
.header-title.active {
    color: #fff;
    text-shadow: 0 0 8px var(--accent-cyan), 0 0 15px var(--accent-cyan);
}

.header-copyright {
    font-size: 0.6rem; /* 極小サイズ */
    color: rgba(255, 255, 255, 0.3); /* 白色の30%不透明度で目立たなくする */
    margin: -2px 0 0 0; /* タイトルとの距離を調整 */
    letter-spacing: 1px;
    font-weight: normal;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;       /* 中央揃え用に追加 */
    justify-content: center;
    align-items: center;
    padding: 0;          /* 余白をリセット */
}

/* ：ボタン内の画像のサイズを制御 */
.icon-btn img {
    width: 30px;         /* お好みのサイズに調整してください */
    height: auto;
    filter: brightness(0.8); /* 少し暗くする場合 */
    transition: filter 0.2s;
}

.icon-btn:active img {
    filter: brightness(1.2); /* クリックした時に光らせる演出 */
    transform: scale(0.9);   /* 押した感を追加 */
}

/* メインページエリア */
#pages-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.page {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow-y: auto;
    background-color: var(--bg-main);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 10px;
}
.page.active {
    opacity: 1; pointer-events: auto; z-index: var(--z-page);
}

/* フッターナビゲーション */
#global-nav {
    height: var(--nav-height);
    background: var(--bg-panel);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: var(--z-nav);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-btn {
    background: none;
    border: none;
    padding: 5px;
    transition: transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-btn img {
    height: 35px; 
    width: auto;
    filter: brightness(0.6); 
    transition: filter 0.2s;
}

.nav-btn.active {
    transform: scale(1.2);
}

.nav-btn.active img {
    filter: brightness(1.2) drop-shadow(0 0 5px var(--accent-cyan));
}

/* ローディング画面 */
#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main);
    z-index: var(--z-loading);
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s;
}

/* オーバーレイ共通 */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: var(--z-overlay);
    display: flex; 
    justify-content: center; 
    align-items: flex-start; 
    overflow-y: auto;        
    padding: 40px 0;         
    opacity: 1; transition: opacity 0.3s;
}
.overlay.hidden { opacity: 0; pointer-events: none; }

.overlay-content {
    background: var(--bg-panel);
    width: 95%; max-width: 800px;
    margin: auto;
    border-radius: 8px;
    padding: clamp(15px, 4%, 30px);
    position: relative;
}

/* 横画面（landscape）時のコンパクト設定を追加 */
@media (orientation: landscape) {
    .overlay-content {
        width: 55vw;         /* デバイス幅に制限 */
        max-width: 600px;    /* 横に広がりすぎないよう上限を下方修正 */
        max-height: 85dvh;   /* 高さを画面の85%に制限し、上下に余白を確保 */
        overflow-y: auto;    /* 高さが足りない場合は内部スクロールを有効化 */
    }
}

/* モーダル閉じるボタンの共通スタイル */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px; /* 右側に配置 */
    width: 30px;
    height: 30px;
    background: #fff; /* 白い四角 */
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

/* 通知トースト */
#notification-area {
    position: fixed;
    top: 70px; left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-notification);
    width: 90%; max-width: 400px;
    pointer-events: none;
}
.toast {
    background: rgba(40, 160, 220, 0.9);
    color: white;
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    text-align: center;
    opacity: 0; transform: translateY(-10px);
    transition: 0.3s;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: rgba(220, 60, 60, 0.9); }

/* --- クッキー同意バナー --- */
#cookie-consent-banner {
    position: fixed;
    bottom: 0; /* 画面の最下端に配置 */
    left: 0;
    width: 100%;
    background: rgba(15, 31, 51, 0.98); /* 背景をわずかに濃くして視認性を向上 */
    color: var(--text-main);
    padding: 20px 15px calc(var(--nav-height) + 20px) 15px;
    z-index: var(--z-notification);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-top: 2px solid var(--accent-cyan); /* 境界線を強調 */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
    
    /* 初期状態（隠れた状態）：transformに加えて、透明度と非表示設定を追加 */
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    
    /* opacityとvisibilityもアニメーションさせる */
    transition: 
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.4s ease,
        visibility 0.6s;
    
    pointer-events: none;
}

/* 表示状態 */
#cookie-consent-banner.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cookie-text {
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
    max-width: 500px;
}

.cookie-links {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
}

.cookie-links a {
    color: var(--accent-cyan);
    text-decoration: underline;
    cursor: pointer;
}

.cookie-btn-area {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.cookie-btn {
    background: var(--accent-cyan);
    color: #fff;
    border: none;
    padding: 10px 40px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, filter 0.2s;
}

.cookie-btn:active {
    transform: scale(0.95);
    filter: brightness(1.1);
}

/* --- 決済クッションページ専用スタイル --- */
#cushion-overlay {
    z-index: 2100; /* 一般オーバーレイ(2000)より高く、通知(3000)より低い値に設定 */
}

.cushion-modal {
    max-width: 450px; /* カード状のコンパクトな幅  */
    text-align: center;
    padding: 30px 20px;
}

.cushion-icon-area img {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.cushion-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #fff;
    font-weight: bold;
}

/* 法的リンクの基本設定 (Landscape: 横並び)  */
.cushion-legal-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.cushion-legal-links a {
    color: var(--accent-cyan);
    font-size: 0.75rem;
    text-decoration: underline;
}

/* 決済ボタンの配色 (image01.pngに基づく)  */
.btn-pay-start {
    background-color: #ff3366 !important; /* 特徴的な赤ピンク色 */
    color: #fff;
    padding: 12px 40px;
    font-size: 1.1rem;
    border-radius: 8px;
    width: auto;
    display: inline-block;
}

/* ロゴエリア */
.cushion-logo-area {
    margin-top: 30px;
}
.cushion-logo-img {
    height: 50px;
    opacity: 0.8;
}

/* Portrait (縦画面) 時のレイアウト調整  */
@media (orientation: portrait) {
    .cushion-legal-links {
        flex-direction: column; /* リンクを縦並びにする */
        gap: 10px;
    }
    
    .cushion-modal {
        width: 90%;
        margin-top: 15vh;
    }
}