/* ---------------------------------------------------------
   「お客様の声」投稿キャンペーン 応募フォーム
   --------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 20px 0;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    background: #f5f5f5;
}

a { color: #1a6fc4; }
a:hover { text-decoration: none; }

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 40px 40px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

/* ===== ヘッダー画像 ===== */
.hero-img {
    display: block;
    width: calc(100% + 80px);
    height: auto;
    margin: -32px -40px 24px;
}

/* ===== SR 専用 H1（SEO・アクセシビリティ用） ===== */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== イントロ ===== */
.intro {
    padding: 16px 20px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    margin-bottom: 24px;
}
.intro p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.85;
}
.intro p:last-child { margin-bottom: 0; }
.intro .small { font-size: 12px; color: #666; }
.intro strong { color: #222; }
.intro .amount { color: #d93025; }

/* ===== 規約ボックス ===== */
.terms-wrap { margin-bottom: 24px; }
.terms-label {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}
.terms-box {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background: #ffffff;
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.8;
    color: #555;
}
.terms-box:focus {
    outline: 2px solid #1a6fc4;
    outline-offset: 1px;
}
.terms-box h3 {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin: 12px 0 4px;
}
.terms-box h3:first-child { margin-top: 0; }
.terms-box p { margin: 0 0 6px; }
.terms-box ul { margin: 0 0 6px; padding-left: 18px; }

/* ===== 必須ノート ===== */
.required-note {
    margin: 0 0 20px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* ===== 必須バッジ ===== */
.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: #d93025;
    border-radius: 2px;
    vertical-align: middle;
    line-height: 1.5;
}

/* ===== エラー ===== */
.errors {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fdecea;
    border: 1px solid #f5c2c0;
}
.errors-title {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 13px;
    color: #c62828;
}
.errors ul { margin: 0; padding-left: 18px; }
.errors li { font-size: 13px; margin: 2px 0; }
.errors-note {
    margin: 8px 0 0;
    font-size: 11px;
    color: #666;
}

/* ===== セクション見出し ===== */
h2 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 32px 0 16px;
    padding: 8px 0 6px 10px;
    border-left: 4px solid #1a6fc4;
    background: #f3f6fb;
}

/* ===== フィールド ===== */
.field { margin-bottom: 20px; }
.field > label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 9px 10px;
    font: inherit;
    font-size: 15px;
    color: #222;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 3px;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1a6fc4;
    box-shadow: 0 0 0 2px rgba(26,111,196,.15);
}
input::placeholder, textarea::placeholder { color: #aaa; }
textarea { min-height: 160px; line-height: 1.8; resize: vertical; }

.row { display: flex; gap: 8px; }
.row select { flex: 1; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23666' stroke-width='1.5'><polyline points='1,1 5,5 9,1'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
}

.help {
    margin: 4px 0 8px;
    font-size: 12px;
    color: #555;
    line-height: 1.75;
}
.help-note {
    margin: 4px 0 8px;
    font-size: 12px;
    color: #d93025;
}
.note-list {
    margin: 8px 0 16px;
    padding-left: 20px;
    font-size: 12px;
    color: #555;
    line-height: 1.85;
}
.note-list li { margin: 2px 0; }

.counter {
    margin: 4px 0 0;
    font-size: 12px;
    color: #888;
    text-align: right;
}
.counter.ok { color: #2e7d32; }
.counter.ng { color: #d93025; }
.counter .count { font-weight: 700; }

/* ===== 写真アップロード ===== */
.photo-uploader { margin-bottom: 20px; }
.photo-uploader .hint {
    margin: 0 0 8px;
    font-size: 12px;
    color: #666;
}

.dropzone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: background .12s;
}
.dropzone:hover,
.dropzone.is-over {
    background: #eef4fc;
    border-color: #1a6fc4;
}
.dropzone-btn {
    display: inline-block;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}
.dropzone:hover .dropzone-btn { border-color: #1a6fc4; color: #1a6fc4; }
.dropzone-text {
    font-size: 12px;
    color: #666;
}

.preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
    margin-top: 10px;
}
.preview:empty { display: none; }
.preview .thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 2px;
}
.preview .thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.preview .thumb__meta {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2px 5px;
    font-size: 10px;
    color: #fff;
    background: rgba(0,0,0,.55);
    text-align: right;
}
.preview .thumb__remove {
    position: absolute;
    top: 3px; right: 3px;
    width: 22px; height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.preview .thumb__remove:hover { background: #d93025; }

.photo-count {
    margin: 6px 0 0;
    font-size: 12px;
    color: #888;
    text-align: right;
}
.photo-count.ok { color: #2e7d32; }
.photo-count.ng { color: #d93025; }

/* ===== 同意 ===== */
.consent {
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    margin-bottom: 24px;
}
.consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.75;
    cursor: pointer;
}
.consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 4px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.consent strong { font-weight: 700; }

/* ===== 送信 ===== */
.submit-area { text-align: center; margin-bottom: 20px; }
button[type="submit"] {
    appearance: none;
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 48px;
    min-width: 200px;
    color: #fff;
    background: #1a6fc4;
    border: 1px solid #1562b0;
    border-radius: 3px;
    cursor: pointer;
}
button[type="submit"]:hover:not(:disabled) { background: #1562b0; }
button[type="submit"]:disabled {
    background: #999;
    border-color: #888;
    cursor: not-allowed;
}
.submitting {
    margin: 10px 0 0;
    font-size: 12px;
    color: #666;
}

.form-footer {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* ===== ハニーポット ===== */
.hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ===== 完了 / 締切 ===== */
.wrap.thanks {
    max-width: 560px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #e0e0e0;
    text-align: center;
}
.thanks h1 {
    font-size: 20px;
    margin: 0 0 16px;
}
.thanks .lead { font-size: 15px; color: #555; margin-bottom: 20px; }
.thanks p { font-size: 13px; margin: 10px 0; }
.thanks .note { font-size: 12px; color: #666; }
.thanks .contact {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 12px;
}

/* ===== モバイル ===== */
@media (max-width: 640px) {
    body { padding: 0; }
    .container { padding: 20px 16px 30px; border: none; }
    .hero-img { width: calc(100% + 32px); margin: -20px -16px 20px; }
    h2 { font-size: 15px; margin: 24px 0 12px; }
    .intro { padding: 12px 14px; }
    .dropzone { flex-direction: column; align-items: stretch; text-align: center; }
    .dropzone-btn { text-align: center; }
    button[type="submit"] { width: 100%; min-width: 0; }
    .wrap.thanks { margin: 16px; padding: 24px 20px; }
}
