@charset "UTF-8";
@import url("tokens.css");
/**
 * 全ページ共通：データ読み込み状態（Loading / Skeleton / Overlay）統一スタイルシート
 * 
 * 1. フルスクリーンオーバーレイのモダン化（圧迫感のある黒幕から毛ガラス微透明カードへ改善）
 * 2. コンテンツ内スケルトンローダー（Skeleton Shimmer）
 * 3. インラインスピナー表示（Inline Loader）
 * 4. アクセシビリティ（prefers-reduced-motion）対応
 */

/* ==========================================================================
   1. ローディングオーバーレイのモダン化（Stage / Ticket 系）
   ========================================================================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* 漆黒の不透明背景から、視認性を維持する半透明アクリル毛ガラスへ改善 */
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.25s ease, visibility 0.25s;
}

/* オーバーレイ中央のローディングカード */
#loading-overlay .loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px 36px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
    gap: 12px;
}

#loading-overlay .loading-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: #38bdf8; /* 明瞭で清潔感のあるシアン */
    border-radius: 50%;
    animation: loading-spin 0.85s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    margin: 0;
}

#loading-overlay .loading-text,
#loading-overlay > div:not(.loading-spinner):not(.loading-card) {
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   2. インラインローダー（非同期読み込み中の局所プレースホルダー）
   ========================================================================== */
.inline-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    width: 100%;
    padding: 24px;
    color: #94a3b8;
    gap: 10px;
    box-sizing: border-box;
}

.inline-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #f43f5e; /* テーマアクセントカラー */
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

.inline-loader-text {
    font-size: 12.5px;
    color: #cbd5e1;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   3. スケルトン骨格スクリーン（Skeleton Screens）
   ========================================================================== */
.skeleton-container {
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* シマー（光の波）アニメーション効果 */
.skeleton-pulse {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.13) 37%,
        rgba(255, 255, 255, 0.05) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
}

/* ランキング行スケルトン構造 */
.skeleton-row {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    gap: 12px;
    box-sizing: border-box;
}

.skeleton-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-text-main {
    height: 14px;
    width: 90px;
    flex-shrink: 0;
}

.skeleton-text-sub {
    height: 10px;
    width: 50px;
    flex-shrink: 0;
}

.skeleton-data-cell {
    height: 14px;
    margin-left: auto;
    width: 55px;
}

/* チャート用スケルトン構造 */
.skeleton-chart-box {
    width: 100%;
    height: 280px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #94a3b8;
}

/* ==========================================================================
   4. アニメーションキーフレーム定義
   ========================================================================== */
@keyframes loading-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* 視覚的配慮：モーション低減設定（ユーザー環境優先） */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner,
    .inline-loader-spinner {
        animation-duration: 2s;
    }
    .skeleton-pulse {
        animation: none;
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ==========================================================================
   5. ヘッダー見出し（h1.title）のリセットおよびレイアウト整合性保持
   ========================================================================== */
h1.title {
    margin: 0 auto;
    padding: 0 5px;
    font-size: 22px;
    font-weight: 500;
    line-height: inherit;
    border: none;
}

/* ==========================================================================
   6. ページ内アンカーリンクのスクロール位置補正（ヘッダー遮蔽防止）
   ========================================================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

[id] {
    scroll-margin-top: 70px;
}

/* ==========================================================================
   7. 見出し要素（h2, h3）の太字解除（標準ウェイトで統一）
   ========================================================================== */
h2, h3 {
    font-weight: normal;
}


