*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --black: #0D0D0D; --white: #FFFFFF;
  --gray-50: #F7F7F5; --gray-100: #EFEFEC; --gray-200: #DDDDD8;
  --gray-400: #ABABAB; --gray-600: #6B6B6B;
  --blue: #1A56DB; --blue-light: #EBF2FF; --red: #E24B4A;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
  --font: 'Helvetica Neue','Hiragino Kaku Gothic ProN','Hiragino Sans',Meiryo,sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--gray-50); color: var(--black); min-height: 100vh; }

.site-header { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 0 2rem; height: 56px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 36px; width: auto; }
.logo-text { font-size: 15px; font-weight: 600; letter-spacing: 0.05em; color: var(--black); }
.logo-sub { color: var(--gray-600); font-weight: 400; }

.page { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem 6rem; }

.hero { margin-bottom: 3rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--gray-200); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); background: var(--blue-light); padding: 4px 12px; border-radius: 20px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(24px,4vw,34px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.hero p { font-size: 15px; color: var(--gray-600); line-height: 1.7; }

.progress-wrap { display: flex; gap: 5px; margin-bottom: 2.5rem; }
.prog-dot { flex: 1; height: 3px; background: var(--gray-200); border-radius: 2px; transition: background 0.4s; }
.prog-dot.filled { background: var(--blue); }

.sec-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.25rem; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 1.5rem; }
.sec-num { width: 28px; height: 28px; border-radius: 50%; background: var(--black); color: var(--white); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sec-title { font-size: 15px; font-weight: 600; }
.sec-sub { font-size: 12px; color: var(--gray-600); margin-top: 1px; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 1rem; }
.field label { font-size: 13px; font-weight: 500; }
.req { color: var(--red); margin-left: 2px; }
.note { font-size: 11px; color: var(--gray-400); line-height: 1.5; margin-top: 2px; }

input[type=text], input[type=email], input[type=tel], input[type=url], select, textarea {
  width: 100%; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; font-family: var(--font);
  background: var(--white); color: var(--black); transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ABABAB' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,0.12); }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
::placeholder { color: var(--gray-400); }
input.error, select.error, textarea.error { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(226,75,74,0.12) !important; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 8px; margin-top: 4px; }
.check-item { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); transition: border-color 0.15s, background 0.15s; user-select: none; }
.check-item:hover { border-color: var(--gray-400); }
.check-item input { display: none; }
.check-item .box { width: 16px; height: 16px; border: 1.5px solid var(--gray-200); border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.check-item input:checked ~ .box { background: var(--blue); border-color: var(--blue); }
.check-item input:checked ~ .box::after { content: ''; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); display: block; }
.check-item:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.radio-btn { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; padding: 8px 14px; border: 1px solid var(--gray-200); border-radius: 20px; transition: all 0.15s; user-select: none; }
.radio-btn input { display: none; }
.radio-btn:hover { border-color: var(--gray-400); }
.radio-btn:has(input:checked) { background: var(--black); border-color: var(--black); color: var(--white); font-weight: 500; }

.url-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.divider { border: none; border-top: 1px solid var(--gray-100); margin: 1.25rem 0; }

.submit-wrap { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; text-align: center; }
.submit-wrap p { font-size: 13px; color: var(--gray-600); margin-bottom: 1.25rem; line-height: 1.6; }
.btn-submit { display: inline-flex; align-items: center; gap: 8px; background: var(--black); color: var(--white); border: none; border-radius: var(--radius-sm); padding: 14px 40px; font-size: 15px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: opacity 0.15s, transform 0.1s; }
.btn-submit:hover { opacity: 0.8; }
.btn-submit:active { transform: scale(0.98); }

.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--black); color: var(--white); padding: 12px 24px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); z-index: 999; white-space: nowrap; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .page { padding: 2rem 1rem 5rem; }
  .sec-card { padding: 1.25rem; }
  .grid2 { grid-template-columns: 1fr; }
}

/* ── Reveal animations ─────────────────────────────────────────────────── */
.sec-card, .submit-wrap {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1), transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.sec-card.visible, .submit-wrap.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .sec-card, .submit-wrap { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Section completion ────────────────────────────────────────────────── */
.sec-num { transition: background 0.3s ease; position: relative; }
.sec-num.done { background: var(--blue); font-size: 0; }
.sec-num.done::after {
  content: '';
  display: block;
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin-top: -2px;
}

/* ── Character counter ─────────────────────────────────────────────────── */
.char-count { font-size: 11px; color: var(--gray-400); text-align: right; margin-top: 2px; transition: color 0.2s; }

/* ── Conditional field ─────────────────────────────────────────────────── */
.cond-field { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease; }
.cond-field.open { max-height: 260px; opacity: 1; }

/* ── URL favicon wrap ──────────────────────────────────────────────────── */
.url-input-wrap { position: relative; }
.url-input-wrap input { padding-right: 36px; }
.url-fav { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; display: none; border-radius: 2px; pointer-events: none; }

/* ── Draft chip ────────────────────────────────────────────────────────── */
.draft-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--gray-400); cursor: pointer; margin-top: 10px; background: none; border: none; font-family: var(--font); padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.draft-chip:hover { color: var(--gray-600); }

/* ── Confirm mail modal ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--black); }
.modal-close { background: none; border: none; font-size: 1.1rem; color: var(--gray-400); cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.modal-close:hover { background: var(--gray-100); color: var(--black); }
.modal-desc { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin: 0; }
.modal-label { font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: -4px; }
.modal-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  box-sizing: border-box;
}
.modal-input:focus { outline: none; border-color: var(--blue); }
.modal-input[readonly] { background: var(--gray-100); color: var(--gray-600); cursor: default; }
.modal-body {
  width: 100%;
  min-height: 220px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--black);
  resize: vertical;
  box-sizing: border-box;
}
.modal-body:focus { outline: none; border-color: var(--blue); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 0.5rem; }
.modal-btn-secondary {
  padding: 10px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
}
.modal-btn-secondary:hover { background: var(--gray-100); }
.modal-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}
.modal-btn-primary:hover { opacity: 0.88; }
@media (max-width: 600px) {
  .modal-box { padding: 1.5rem 1.25rem; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-btn-secondary, .modal-btn-primary { width: 100%; justify-content: center; }
}
