body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    padding: 20px;
    position: relative;
}

/* ロゴ */
.logo {
    position: absolute;
    /* 左上に固定 */
    top: 20px;
    left: 20px;
    height: 50px;
    /* 必要に応じて調整 */
}

.logo img {
    height: 100%;
    /* ロゴの高さを合わせる */
    display: block;
}

.container {
    max-width: 600px;
    margin: 70px auto 0px auto;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    scroll-margin-top: 80px;
}

h2 {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    box-sizing: border-box;
}

button {
    margin-top: 20px;
    padding: 12px;
    width: 100%;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: scale(0.98);
}

/* 必須表示（赤） */
.required {
    color: #e60023;
    font-size: 0.85em;
    margin-left: 6px;
}

/* 非表示制御（JSと連動） */
.hidden {
    display: none !important;
}

/* 横幅統一 */
input,
select {
    height: 42px;
}

/* テキストエリアは縦だけ伸縮可能 */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* -----------------------------
   選択式ラッパー＆矢印
   ----------------------------- */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 30px;
    /* 矢印分の余白 */
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* ラッパーの矢印 */
.select-wrapper::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid black;
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* フォーカス中に矢印を回転 */
.select-wrapper.open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 選択中アニメーション */
.select-wrapper select:focus {
    transform: scale(1.02);
    background-color: #f0f0f0;
}

/* フォームの視認性アップ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border: 1px solid #000;
    background: #fafafa;
}

/* 必須項目未入力時の視覚フィードバック */
input:invalid,
select:invalid,
textarea:invalid {
    border: 1px solid #e60023;
}

/* アニメーション用 */
.fade-section {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease;
    will-change: opacity, transform;
}

/* 表示状態 */
.fade-section.show {
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0);
}

.note {
    font-size: 12px;
    color: #666;
}