/* ==========================================================================
   ■ CATEGORY 1: 全体リセット & 共通ベース
   ========================================================================== */
* {
    box-sizing: border-box; /* 余白を含めたサイズ計算 */
    margin: 0;
    padding: 0;
}

/* 💻 PC・タブレット（初期状態：画面の上下左右のど真ん中に配置する設定） */
body {
    width: 95%;
    max-width: 720px;
    min-height: 100vh;         /* 画面全体の高さを確保 */
    display: flex;
    flex-direction: column;    /* コンテンツを縦に並べる */
    justify-content: center;   /* 【PC真ん中】上下のど真ん中に配置 */
    margin: 0 auto;            /* 左右を自動で中央寄せ */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f6f8; /* 画面の端まで綺麗にこの上品なグレーになります */
    color: #333a42;            /* 全体の文字のベースカラー */
}

/* ==========================================================================
   ■ CATEGORY 2: UIメインコンテナ（白いカードエリア）
   ========================================================================== */
.ui-container {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;             /* 通常時（PC等）の余白 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ─── タイトルエリア ─── */
.title-area {
    margin-bottom: 24px;
    text-align: center;
}

.title-area h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.title-area p {
    font-size: 14px;           /* 通常時（PC等）の文字サイズ */
    color: #868e96;
}

/* ─── フィールドエリア（ドロップ領域） ─── */
.field-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;             /* 通常時（PC等）の高さ */
    border: 2px dashed #dee2e6; /* 点線の外枠 */
    border-radius: 12px;
    background-color: #f8f9fa;   /* コンテナより一段暗い背景 */
    cursor: pointer;
    transition: all 0.25s ease-in-out; /* アニメーションを滑らかに */
    padding: 24px;             /* 通常時（PC等）の余白 */
    text-align: center;
}

/* 【状態変化】マウスホバー時 */
.field-area:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* 【状態変化】JS連動：ファイルを上に重ねている時 */
.field-area.highlight {
    border-color: #333a42;      
    background-color: #dee2e6;
    transform: scale(1.01);     
}

/* 【状態変化連動】ハイライト時のアイコンの動き */
.field-area.highlight .upload-icon {
    transform: translateY(-4px); 
}

/* 【パーツ】アップロード用SVGアイコン */
.field-area .upload-icon {
    color: #495057;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
}

/* 【パーツ】案内テキスト */
.field-area .upload-text {
    font-size: 15px;           /* 通常時（PC等）の文字サイズ */
    font-weight: 500;
    line-height: 1.6;
}

/* 【パーツ】画面から隠すデフォルトのファイル選択ボタン */
.field-area #file-elem {
    display: none;
}

/* ==========================================================================
   ■ CATEGORY 3: スマホ限定（画面幅 576px 未満のときだけ適用）
   ========================================================================== */
@media (max-width: 575.98px) {
    /* 📱 スマホ時は画面が狭いので、上起点で詰めて並べるレイアウトに切り替え */
    body {
        justify-content: flex-start; 
        padding: 40px 0;       /* 上下にクッションの余白を作る */
    }

    /* 📱 スマホのときだけメインコンテナのpaddingを24pxの半分（12px）にする */
    .ui-container {
        padding: 12px; 
    }

    /* 📱 スマホのときだけ見出しを少しコンパクトにする */
    .title-area h1 {
        font-size: 1.2rem; 
    }
    
    /* 📱 スマホのときだけ説明文と案内テキストを0.625remに極小化する */
    .title-area p,
    .field-area .upload-text {
        font-size: 0.625rem; 
    }
    
    /* 📱 スマホのときだけドロップエリアのpaddingを24pxの半分（12px）にする */
    .field-area {
        height: 200px;         /* スマホに合わせたコンパクトな高さ */
        padding: 12px; 
    }
}