/* ===== ベース ===== */
body {
    font-family: Arial, sans-serif;
    background: #000;
    color: #d4af37;
    padding: 20px;
    margin: 0;
}

/* ===== コンテナ ===== */
.container {
    max-width: 900px;
    margin: auto;
    background: #111;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

/* ===== 見出し ===== */
h2 {
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* ===== フィールド ===== */
fieldset {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #d4af37;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

legend {
    color: #ffd700;
    font-weight: bold;
    padding: 0 10px;
}

/* ===== 必須マーク ===== */
.required::after {
    content: " *";
    color: #ff4d4d;
    font-weight: bold;
}

/* ===== グリッド ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ===== 入力 ===== */
input,
select {
    padding: 10px;
    background: #000;
    color: #d4af37;
    border: 1px solid #d4af37;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

input::placeholder {
    color: #888;
}

input:focus,
select:focus {
    box-shadow: 0 0 6px #d4af37;
    outline: none;
}

/* ===== ボタン ===== */
button {
    width: 100%;
    padding: 14px;
    background: #d4af37;
    border: none;
    margin-top: 20px;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.2s;
}

button:hover {
    opacity: 0.9;
    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== 横並び（ラジオ・チェック） ===== */
.inline-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.form-group {
    margin-top: 15px;
}

/* 横並び */
.inline-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.agree {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.agree input {
    margin: 0;
    width: 16px;
    height: 16px;
}

.agree-text a {
    color: #0066cc;
    text-decoration: underline;
}

.agree-text a:hover {
    text-decoration: none;
}

/* ラベル整形 */
.inline-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* ラジオ位置微調整 */
.inline-group input[type="radio"] {
    transform: scale(1.2);
}

/* ===== 同意チェック ===== */
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.inline-group input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* ===== エラー ===== */
.error {
    border: 2px solid #ff4d4d;
    background: #2a0000;
}

.error-msg {
    color: #ff4d4d;
    font-size: 12px;
    margin-top: 2px;
}

.valid {
    border: 2px solid #4CAF50;
}

/* ===== 非表示 ===== */
.hidden {
    display: none;
}

/* ===== QR ===== */
.qr-area {
    text-align: center;
    margin-top: 25px;
}

#qrUrl {
    font-size: 12px;
    margin-top: 10px;
    word-break: break-all;
    color: #aaa;
}

/* 横並び対応 */
.row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.row input,
.row select {
    flex: 1;
    min-width: 0;
    /* はみ出し防止 */
}

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {

    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    input,
    select {
        font-size: 16px;
        padding: 12px;
    }

    .inline-group {
        flex-direction: row;
        gap: 15px;
    }

    .form-group label {
        flex-wrap: wrap;
    }

    .row {
        flex-direction: column;
    }
}

/* ===== 小型スマホ ===== */
@media (max-width: 400px) {
    h2 {
        font-size: 18px;
    }
}