posimai-store/contact.html

263 lines
8.5 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="description" content="お問い合わせ — Posimai Store">
<meta name="theme-color" content="#0D0D0D">
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" href="/logo.png">
<title>お問い合わせ — Posimai Store</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0D0D0D;
--surface: #161616;
--surface2: #1e1e1e;
--border: rgba(255,255,255,0.08);
--border-focus: rgba(110,231,183,0.4);
--text: #F3F4F6;
--text2: #9CA3AF;
--text3: #6B7280;
--accent: #6EE7B7;
--accent-dim: rgba(110,231,183,0.08);
--radius: 16px;
--radius-sm: 10px;
}
body {
font-family: 'Inter', -apple-system, sans-serif;
background: var(--bg);
color: var(--text);
font-size: 15px;
line-height: 1.7;
-webkit-font-smoothing: antialiased;
}
nav {
position: sticky;
top: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24px;
height: 56px;
background: rgba(13,13,13,0.85);
backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
}
.nav-brand { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.nav-brand span { color: var(--accent); }
.nav-back {
font-size: 13px;
color: var(--text2);
text-decoration: none;
transition: color 0.15s;
}
.nav-back:hover { color: var(--text); }
main {
max-width: 560px;
margin: 0 auto;
padding: 64px 24px 96px;
}
h1 {
font-size: 22px;
font-weight: 600;
letter-spacing: -0.03em;
margin-bottom: 8px;
}
.subtitle {
font-size: 13px;
color: var(--text3);
margin-bottom: 40px;
}
form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label {
font-size: 13px;
font-weight: 500;
color: var(--text2);
}
.required::after {
content: ' *';
color: var(--accent);
}
input, select, textarea {
width: 100%;
padding: 12px 14px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text);
font-family: inherit;
font-size: 14px;
transition: border-color 0.15s;
outline: none;
}
input:focus, select:focus, textarea:focus {
border-color: var(--border-focus);
}
select option { background: var(--surface2); }
textarea { resize: vertical; min-height: 120px; }
.submit-btn {
padding: 13px 24px;
background: var(--accent);
color: #0D0D0D;
border: none;
border-radius: var(--radius-sm);
font-family: inherit;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.15s;
align-self: flex-start;
}
.submit-btn:hover { opacity: 0.85; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.notice {
margin-top: 24px;
padding: 14px 16px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 13px;
color: var(--text2);
}
/* 送信完了メッセージ */
.success-msg {
display: none;
padding: 20px;
background: var(--accent-dim);
border: 1px solid rgba(110,231,183,0.2);
border-radius: var(--radius-sm);
font-size: 14px;
color: var(--accent);
text-align: center;
}
</style>
</head>
<body>
<nav>
<div class="nav-brand">Posimai <span>Store</span></div>
<a class="nav-back" href="/">ストアに戻る</a>
</nav>
<main>
<h1>お問い合わせ</h1>
<p class="subtitle">通常 1〜2 営業日以内にご返信します</p>
<form id="contact-form">
<div class="field">
<label for="type" class="required">お問い合わせ種別</label>
<select id="type" name="type" required>
<option value="">選択してください</option>
<option value="purchase">購入・決済について</option>
<option value="license">ライセンス・アクセス権について</option>
<option value="refund">返金について</option>
<option value="usage">使い方・機能について</option>
<option value="bug">不具合の報告</option>
<option value="other">その他</option>
</select>
</div>
<div class="field">
<label for="name" class="required">お名前</label>
<input type="text" id="name" name="name" required placeholder="山田 太郎">
</div>
<div class="field">
<label for="email" class="required">メールアドレス(返信先)</label>
<input type="email" id="email" name="email" required placeholder="example@email.com">
</div>
<div class="field">
<label for="subject" class="required">件名</label>
<input type="text" id="subject" name="subject" required placeholder="例:購入後にライセンスが届かない">
</div>
<div class="field">
<label for="message" class="required">お問い合わせ内容</label>
<textarea id="message" name="message" required placeholder="詳しい状況をお書きください"></textarea>
</div>
<button type="submit" class="submit-btn" id="submit-btn">送信する</button>
</form>
<div class="success-msg" id="success-msg">
お問い合わせを受け付けました。1〜2 営業日以内にご返信します。
</div>
<p class="notice">
購入後のご不明点には注文番号(メール記載)を添えていただくとスムーズです。
</p>
</main>
<script>
const form = document.getElementById('contact-form');
const btn = document.getElementById('submit-btn');
const success = document.getElementById('success-msg');
form.addEventListener('submit', async (e) => {
e.preventDefault();
btn.disabled = true;
btn.textContent = '送信中...';
const data = {
type: document.getElementById('type').value,
name: document.getElementById('name').value,
email: document.getElementById('email').value,
subject: document.getElementById('subject').value,
message: document.getElementById('message').value,
};
try {
const res = await fetch('https://api.soar-enrich.com/api/store/contact', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data),
});
if (res.ok) {
form.style.display = 'none';
success.style.display = 'block';
} else {
const err = await res.json().catch(() => ({}));
alert(err.error || '送信に失敗しました。時間をおいて再度お試しください。');
btn.disabled = false;
btn.textContent = '送信する';
}
} catch {
alert('通信エラーが発生しました。');
btn.disabled = false;
btn.textContent = '送信する';
}
});
</script>
</body>
</html>