@charset "UTF-8";

/* ===== 画面全体 ===== */
body {
    margin: 0;
    min-height: 100vh;
    padding: 24px 12px;
    box-sizing: border-box;
    text-align: center;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    color: #333;
}

/* ===== 背景のイラスト =====
   画面いっぱいに固定して表示する。
   画像が見つからないときは、後ろのグラデーションが表示される。 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background:
        url("images/background.jpg") center / cover no-repeat,
        linear-gradient(135deg, #3b2a5a, #1f1b3a);
}

/* ===== 白い背景の枠 ===== */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===== タイトルのフォント =====
   最初に書いたフォントが読み込めなければ、順番に次のフォントが使われる */
h1 {
    margin: 0 0 16px;
    font-family: "Kaisei Decol", "Hiragino Mincho ProN", "Yu Mincho", serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

section + section {
    margin-top: 28px;
}

.title {
    text-decoration-line: underline;
}

/* ===== 入力欄 ===== */
input,
textarea {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 8px auto;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
    border: 1px solid #bbb;
    border-radius: 8px;
}

/* ===== ボタン ===== */
.buttons {
    margin-top: 12px;
}

button {
    padding: 10px 36px;
    font-size: 16px;
    color: #ffffff;
    background: #5b3f8c;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

button:hover {
    background: #6f52a3;
}

button:disabled {
    background: #aaaaaa;
    cursor: not-allowed;
}

/* ===== 結果の表示欄 ===== */
.result-box {
    width: 100%;
    min-height: 80px;
    margin: 0 auto;
    padding: 14px;
    box-sizing: border-box;
    background: #faf8ff;
    border: 1px solid #d5cbe8;
    border-radius: 8px;
    text-align: left;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ===== スマートフォン向けの調整 ===== */
@media (max-width: 480px) {
    body {
        padding: 12px 8px;
    }

    .container {
        padding: 18px 14px 24px;
    }

    h1 {
        font-size: 1.35rem;
    }
}