@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap');

/* ----------------------------------------------------------
    デザインシステム
------------------------------------------------------------- */
:root {
    --primary-gradient: linear-gradient(135deg, #3B6147, #5A8760);
    --accent-color: #D4AF37;
    --bg-color: #F8F7F5;
    --form-bg: #FFFFFF;
    --text-color: #1B1B1B;
    --text-muted: #666666;
    --error-color: #D9534F;
    --border-color: #E0DDD5;
    --radius-pill: 50px;
    --radius-sm: 4px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* ----------------------------------------------------------
    ベース
------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Noto Serif JP", serif;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

/* ----------------------------------------------------------
    レイアウト
------------------------------------------------------------- */
#wrapper {
    max-width: 800px;
    margin: 60px auto;
    padding: 60px 40px;
    background: var(--form-bg);
    box-shadow: var(--shadow);
    border-radius: 12px;
}

@media screen and (max-width: 768px) {
    #wrapper {
        margin: 20px 15px;
        padding: 40px 20px;
    }
}

#main {
    width: 100%;
}

/* ----------------------------------------------------------
    見出し・テキスト
------------------------------------------------------------- */
.section__ttl {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
    color: var(--text-color);
}

.section__ttl::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

#txt_explain {
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
}

.red_txt {
    color: var(--error-color);
    background: rgba(217, 83, 79, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: bold;
    text-align: center;
    border: 1px solid rgba(217, 83, 79, 0.1);
}

.red_txt:empty {
    display: none;
}

/* ----------------------------------------------------------
    フォーム・テーブル
------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 20px;
    margin-bottom: 40px;
}

.table tr {
    display: flex;
    flex-direction: column;
}

.table th {
    padding: 0 0 8px 0;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-color);
    text-align: left;
    display: flex;
    align-items: center;
}

.table td {
    padding: 0;
    width: 100%;
}

/* 必須マークのカスタマイズ (Xserver側のHTML構造に依存) */
.table th font[color="red"],
.table th span[style*="color:red"] {
    color: var(--error-color) !important;
    font-size: 12px;
    margin-left: 8px;
    background: rgba(217, 83, 79, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: normal;
}

/* フォーム部品 */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100% !important; /* Xserverのインラインスタイルを上書き */
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #FAFAFA;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-color);
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #3B6147;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 97, 71, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* ----------------------------------------------------------
    ボタン
------------------------------------------------------------- */
.button_box {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

input[type="submit"] {
    min-width: 240px;
    padding: 18px 40px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--primary-gradient);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(59, 97, 71, 0.2);
    font-family: inherit;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(59, 97, 71, 0.3);
    opacity: 0.9;
}

input[type="submit"][value="戻る"] {
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

input[type="submit"][value="戻る"]:hover {
    background: #F8F7F5;
    color: var(--text-color);
    border-color: var(--text-muted);
}

/* 戻るリンク */
.back_to_site {
    display: block;
    text-align: center;
    margin-top: 60px;
    font-size: 14px;
}

.back_to_site a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 2px;
}

.back_to_site a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-muted);
    transition: width 0.3s;
}

.back_to_site a:hover {
    color: var(--text-color);
}

.back_to_site a:hover::after {
    width: 100%;
}

/* ----------------------------------------------------------
    完了画面
------------------------------------------------------------- */
.thanks_content {
    text-align: center;
    padding: 40px 0;
}

.thanks_icon {
    width: 80px;
    height: 80px;
    background: rgba(59, 97, 71, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #3B6147;
    font-size: 40px;
}