/* DotRaon ガラスフィルム保証 申請フォーム用CSS（2026-09 刷新・配色はウォームグレージュ＝LINEリッチメニューと同系統） */
@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@600;700;800&family=Zen+Kurenaido&display=swap");

:root {
    --accent:      #77654e;   /* メイン（ボタン・番号・選択状態）ゴールドブラウン */
    --accent-deep: #66533d;   /* 強調文字・リンク（白背景でAA） */
    --bar:         #7d6b54;   /* 見出しバー */
    --bar-2:       #71624f;
    --soft:        #ddd4c8;   /* 枠線 */
    --pale:        #ede7dd;   /* ピル・淡い背景 */
    --tint:        #f8f5f0;   /* カード内の淡い背景 */
    --taupe:       #80715d;   /* アイコン円 */
    --ink:         #302e2b;   /* 本文 */
    --ink-2:       #4f4a44;
    --muted:       #6e675e;
    --bg:          #f7f6f3;
    --line:        #e3ded6;
    --input-bg:    #fcfbf9;
    --red:         #c9463f;   /* 必須・エラー（暖色系の赤） */
    --red-bg:      #fdf3f1;
    --focus:       rgba(119,101,78,0.25);
    --serif:       "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    --hand:        "Zen Kurenaido", "Hiragino Maru Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

/* ===== ヘッダー ===== */
.header {
    position: relative;
    overflow: hidden;
    color: var(--ink);
    margin-bottom: 16px;
    background:
        radial-gradient(520px 340px at 80% 45%, rgba(255,250,240,0.70), transparent 70%),
        radial-gradient(460px 280px at 6% 100%, rgba(226,216,202,0.55), transparent 70%),
        radial-gradient(300px 200px at 40% 0%, rgba(255,255,255,0.9), transparent 70%),
        linear-gradient(120deg, #fcfbf8 0%, #f0ece5 50%, #e6dfd5 100%);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 14px 30px -22px rgba(110,95,80,0.40);
}
/* ぼかした光の玉（ボケ味） */
.header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 88% 18%, rgba(255,255,255,0.75) 0 14px, transparent 15px),
        radial-gradient(circle at 63% 88%, rgba(255,255,255,0.55) 0 9px, transparent 10px),
        radial-gradient(circle at 96% 70%, rgba(255,255,255,0.6) 0 6px, transparent 7px),
        radial-gradient(circle at 52% 8%, rgba(255,255,255,0.5) 0 5px, transparent 6px);
    filter: blur(1px);
}
.header-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 18px;
}
.header-copy {
    position: relative;
    z-index: 1;
    padding-right: 38%;
}
.header-brand {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    color: var(--ink);
    line-height: 1.2;
}
.header-brand small {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-top: 2px;
}
.header-tagline {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--hand);
    font-size: 0.95rem;
    color: #79664e;
    line-height: 1.4;
    padding-bottom: 6px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M2 6 C 60 1, 140 1, 198 5' fill='none' stroke='%2377654e' stroke-width='1.6' stroke-linecap='round'/></svg>") no-repeat left bottom / 100% 8px;
}
.header h1 {
    margin: 8px 0 0;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: var(--ink);
}
.header h1 .hl {
    color: var(--accent-deep);
    font-size: 1.18em;
    font-weight: 800;
    letter-spacing: 0;
}
.header-lead {
    margin: 6px 0 0;
    font-size: 0.86rem;
    color: var(--ink-2);
    letter-spacing: 0.04em;
}
.header .subtitle {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #4e4335;
    background: var(--pale);
    border: 1px solid rgba(119,101,78,0.30);
    border-radius: 999px;
}
.header-features {
    list-style: none;
    margin: 16px -38% 0 0;   /* 写真の下まで横幅を使う（.header-copy の padding-right を打ち消す） */
    padding: 0;
    display: flex;
    gap: 6px;
}
.header-features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    white-space: nowrap;
    flex: 1 1 0;
    min-width: 0;
}
.header-features .fi {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(160deg, #968773, var(--taupe));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 4px 10px -6px rgba(90,75,60,0.5);
}
.header-features .fi svg { width: 17px; height: 17px; display: block; }
.header-visual {
    position: absolute;
    right: -6px;
    top: 6px;
    width: 44%;
    max-width: 200px;
    pointer-events: none;
}
.header-visual img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-mask-image:
        linear-gradient(90deg, transparent 0, #000 30%),
        linear-gradient(180deg, #000 0, #000 62%, transparent 96%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(90deg, transparent 0, #000 30%),
        linear-gradient(180deg, #000 0, #000 62%, transparent 96%);
    mask-composite: intersect;
}
.header .nw { white-space: nowrap; }
/* サブページ用（完了・規約・プライバシー）: 簡略版 */
.header--compact .header-tagline,
.header--compact .header-lead,
.header--compact .header-features,
.header--compact .header-visual { display: none; }
.header--compact .header-copy { padding-right: 0; text-align: center; }
.header--compact .header-inner { padding: 18px 16px 16px; }
.header--compact h1 { font-size: 1.35rem; }

@media (min-width: 640px) {
    .header-inner { padding: 30px 24px 26px; }
    .header-copy { padding-right: 300px; }
    .header-brand { font-size: 1.2rem; }
    .header-tagline { font-size: 1.05rem; margin-top: 14px; }
    .header h1 { font-size: 2.15rem; margin-top: 10px; }
    .header-lead { font-size: 0.95rem; }
    .header-features { margin: 22px 0 0; gap: 14px; }
    .header-features li { font-size: 0.82rem; gap: 8px; flex: 0 1 auto; }
    .header-features .fi { width: 44px; height: 44px; }
    .header-features .fi svg { width: 22px; height: 22px; }
    .header-visual { width: 272px; max-width: none; right: 10px; top: auto; bottom: 0; }
    .header-visual img {
        -webkit-mask-image:
            linear-gradient(90deg, transparent 0, #000 26%),
            linear-gradient(180deg, transparent 0, #000 12%);
        mask-image:
            linear-gradient(90deg, transparent 0, #000 26%),
            linear-gradient(180deg, transparent 0, #000 12%);
    }
    .header--compact h1 { font-size: 1.6rem; }
}

/* ===== カード類 ===== */
.card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(90,80,70,0.08);
    padding: 24px 20px;
    margin-bottom: 16px;
}

.flow-section {
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(90,80,70,0.08);
}
.flow-title {
    background: linear-gradient(90deg, var(--bar), var(--bar-2));
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 14px;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
}
.flow-step {
    flex: 1;
    min-width: 0;
    text-align: center;
    position: relative;
    background: var(--tint);
    border: 1px solid var(--pale);
    border-radius: 14px;
    padding: 12px 4px 10px;
}
.flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 4px;
    box-shadow: 0 3px 8px -3px rgba(102,83,61,0.55);
}
.flow-icon { font-size: 1.8rem; line-height: 1; margin: 4px 0; }
.flow-text { font-size: 0.78rem; color: var(--ink); line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.flow-arrow { color: var(--accent); font-size: 0.9rem; flex: 0 0 auto; align-self: center; }

.warranty-info {
    background: var(--tint);
    border-left: 4px solid var(--accent);
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.92rem;
}
.warranty-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    color: var(--accent-deep);
}
.warranty-info ul {
    margin: 0;
    padding-left: 20px;
}
.warranty-info .alert {
    margin-top: 10px;
    color: #a8433a;
    font-size: 0.85rem;
}

form { margin: 0; }

.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--ink);
}
.required {
    color: var(--red);
    font-size: 0.8rem;
    margin-left: 6px;
}
.optional {
    color: var(--muted);
    font-size: 0.8rem;
    margin-left: 6px;
    font-weight: normal;
}
.help {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
}
select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23a68f7b' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px var(--focus);
}
.field.error input,
.field.error select,
.field.error textarea {
    border-color: var(--red);
    background: var(--red-bg);
}
.error-msg {
    color: var(--red);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* クライアント検証エラー（送信ボタン押下後のみ表示） */
form.submitted input:invalid,
form.submitted select:invalid,
form.submitted textarea:invalid {
    border-color: var(--red);
    background: var(--red-bg);
}
form.submitted .field:has(input:invalid) .file-area,
form.submitted .field:has(select:invalid) .file-area {
    border-color: var(--red);
    background: var(--red-bg);
}
form.submitted .field:has(input:invalid) .file-area .file-text,
form.submitted .field:has(input:invalid) .file-area .file-icon {
    color: var(--red);
}
form.submitted .field:has(input[type="radio"]:invalid) .radio-group label {
    border-color: var(--red);
}
form.submitted .field:has(input[type="checkbox"]:invalid) .agree-area {
    border: 1px solid var(--red);
    background: var(--red-bg);
}
form.submitted .field:has(input[type="checkbox"]:invalid) .agree-check {
    color: var(--red);
}

.radio-group, .checkbox-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.radio-group label, .checkbox-group label {
    flex: 1 1 calc(33% - 8px);
    min-width: 100px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--input-bg);
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
}
.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio-group label:has(input:checked),
.checkbox-group label:has(input:checked) {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px -4px rgba(102,83,61,0.5);
}

.file-area {
    border: 2px dashed #d3cbbf;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: var(--input-bg);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.file-area:hover { border-color: var(--accent); background: var(--tint); }
.file-area.has-file { background: var(--tint); border-color: var(--accent); border-style: solid; }
.file-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-area .file-icon { font-size: 2rem; color: var(--muted); }
.file-area .file-text { color: var(--ink-2); font-size: 0.9rem; margin-top: 4px; }
.file-area.has-file .file-text { color: var(--accent-deep); font-weight: 600; }
.file-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 12px auto 0;
    border-radius: 8px;
    display: block;
}

.agree-area {
    background: #f4f1ec;
    padding: 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--ink-2);
    margin-bottom: 14px;
    max-height: 180px;
    overflow-y: auto;
}
.agree-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}
.agree-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-deep);
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #7a684f, #65533f);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    margin-top: 8px;
    box-shadow: 0 10px 22px -10px rgba(102,83,61,0.7);
}
.submit-btn:hover { filter: brightness(0.96); transform: translateY(-1px); }
.submit-btn:disabled { background: #c9c3ba; box-shadow: none; cursor: not-allowed; transform: none; }

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    padding: 20px 0;
}
.footer a, .card a { color: var(--accent-deep); }

/* 完了ページ用 */
.complete-card {
    text-align: center;
    padding: 40px 20px;
}
.complete-card .icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #7a684f, #65533f);
    box-shadow: 0 10px 24px -10px rgba(102,83,61,0.65);
}
.complete-card h2 {
    margin: 0 0 8px 0;
    font-family: var(--serif);
    color: var(--ink);
}
.complete-card .receipt-no {
    background: var(--tint);
    border: 1px solid var(--pale);
    padding: 16px;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 360px;
    font-size: 1.1rem;
}
.complete-card .receipt-no strong {
    display: block;
    font-size: 1.6rem;
    color: var(--accent-deep);
    margin-top: 4px;
    letter-spacing: 0.04em;
}

/* エラーアラート */
.alert-box {
    background: var(--red-bg);
    border-left: 4px solid var(--red);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    color: #96352f;
}
.alert-box ul {
    margin: 6px 0 0 0;
    padding-left: 20px;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .card { padding: 18px 14px; }
    .flow-step { padding: 10px 3px 8px; }
    .flow-text { font-size: 0.72rem; }
    .flow-icon { font-size: 1.6rem; }
    .header-tagline { font-size: 0.88rem; }
}
@media (max-width: 400px) {
    .flow-steps { gap: 5px; }
    .flow-arrow { display: none; }
    .flow-step { padding: 10px 2px 8px; }
    .flow-text { font-size: 0.68rem; }
    .header-copy { padding-right: 34%; }
    .header-visual { width: 42%; right: -10px; }
    .header-features { margin-right: -34%; }
    .header-tagline { font-size: 0.78rem; }
    .radio-group label, .checkbox-group label {
        flex: 1 1 calc(50% - 8px);
    }
}
