@charset "UTF-8";

/* ==========================================================================
   0. RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-body: #F4F6F8;
  --bg-panel: #FFFFFF;
  --text-main: #222222;
  --text-body: #444444;
  --text-muted: #666666;
  --text-inverse: #FFFFFF;
  --text-danger: #D32F2F;
  --primary-color: #0056b3;
  --selected-bg: rgba(0, 86, 179, 0.08);
  --selected-border: #0056b3;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --border-glass: 1px solid rgba(0, 0, 0, 0.1);
  --border-danger: 1px solid rgba(211, 47, 47, 0.5);
  --radius: 12px;
  --font-base: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  --input-bg: #FFFFFF;
  --input-border: 1px solid #CCCCCC;
  --input-focus: 1px solid #0056b3;
  --progress-color: #3b82f6;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-body);
  font-family: var(--font-base);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  top: -10vh; left: -10vw;
  width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(0,86,179,0.03) 0%, transparent 60%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 60px 16px;
}

/* ==========================================================================
   1. STICKY PROGRESS BAR
   ========================================================================== */
.sticky-progress {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-body);
  border-bottom: var(--border-glass);
  padding: 10px 20px 8px 20px;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.progress-track {
  background-color: rgba(0,0,0,0.08);
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  background-color: var(--progress-color);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(59,130,246,0.35);
}

/* ==========================================================================
   2. HEADER
   ========================================================================== */
.header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.header-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, #0056b3 0%, #3b82f6 55%, #93c5fd 100%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  max-width: 640px;
  margin: 0 auto;
  justify-content: center;
}
.header-brand-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #0056b3 0%, #3b82f6 100%);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,86,179,0.28);
  letter-spacing: -0.02em;
}
.header-text-group {
  text-align: left;
}
.header-brand-name {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.22em;
  margin: 0 0 2px;
  line-height: 1;
  font-family: var(--font-base);
}
.header h1 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

/* ==========================================================================
   3. GLASS PANEL
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: var(--border-glass);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

/* ==========================================================================
   4. INTRO BOX & NOTICE
   ========================================================================== */
.intro-box {
  margin-bottom: 24px;
}
.intro-lead {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0,86,179,0.06) 0%, rgba(59,130,246,0.03) 100%);
  border: 1px solid rgba(0,86,179,0.13);
  border-radius: 8px;
  padding: 13px 15px;
  margin-bottom: 16px;
}
.intro-icon-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0056b3 0%, #3b82f6 100%);
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,86,179,0.22);
  line-height: 1;
}
.intro-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 3px;
  font-family: var(--font-base);
}
.intro-sub {
  font-size: 0.73rem;
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
  font-family: var(--font-base);
}
.intro-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.85;
}
.notice-box {
  background: rgba(211, 47, 47, 0.04);
  border: var(--border-danger);
  border-radius: 8px;
  padding: 11px 15px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-danger);
  line-height: 1.7;
}
.notice-box p { margin: 3px 0; }
.notice-box p:first-child { margin-top: 0; }
.notice-box p:last-child { margin-bottom: 0; }

/* ==========================================================================
   5. STEP INDICATOR
   ========================================================================== */
.step-indicator-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin: 20px 0 24px;
  padding: 0 4px;
}
.step-indicator-bar::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: rgba(0,0,0,0.1);
  z-index: 0;
}
.step-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 6px;
  position: relative;
  z-index: 1;
  cursor: default;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  background: #f1f3f5;
  color: #aaaaaa;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}
.step-label {
  font-size: 0.6rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.4;
  transition: color 0.3s;
}
.step-tab.active .step-circle {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,86,179,0.38);
}
.step-tab.active .step-label {
  color: var(--primary-color);
  font-weight: 700;
}
.step-tab.done .step-circle {
  background: rgba(0,86,179,0.1);
  border-color: rgba(0,86,179,0.3);
  color: var(--primary-color);
}
.step-tab.done .step-num { display: none; }
.step-tab.done .step-circle::after {
  content: "✓";
  font-size: 0.88rem;
  font-weight: 800;
}
.step-tab.done .step-label {
  color: rgba(0,86,179,0.55);
}

/* ==========================================================================
   6. FORM SECTION
   ========================================================================== */
.form-section {
  display: none;
  margin-bottom: 24px;
}
.form-section.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

h2 {
  font-size: 1.1rem;
  border-bottom: 2px solid rgba(0,86,179,0.15);
  padding-bottom: 10px;
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--text-main);
}

h3 {
  font-size: 0.95rem;
  color: var(--primary-color);
  margin-top: 32px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(0,86,179,0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 6px 6px 0;
}

.form-group {
  margin-bottom: 28px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text-main);
}

.sub-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  margin-top: 14px;
}

/* ==========================================================================
   7. BADGES & NOTES
   ========================================================================== */
.badge-req {
  background: var(--text-danger);
  color: #FFFFFF;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 700;
}
.badge-opt {
  background: #888;
  color: #FFFFFF;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 700;
}

.field-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.6;
}
.field-note-alert {
  font-size: 0.8rem;
  color: var(--text-danger);
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(211,47,47,0.05);
  border: var(--border-danger);
  border-radius: 6px;
  line-height: 1.6;
}

/* ==========================================================================
   8. INPUTS
   ========================================================================== */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 14px;
  border: var(--input-border);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  background-color: var(--input-bg);
  color: var(--text-main);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font-base);
}
input:focus, select:focus, textarea:focus {
  border: var(--input-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,86,179,0.12);
  background-color: #FAFCFF;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
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 fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ==========================================================================
   9. RADIO / CHECKBOX GROUPS
   ========================================================================== */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-group label,
.checkbox-group label {
  font-weight: normal;
  background: #FFFFFF;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #DDDDDD;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
  color: var(--text-body);
  transition: all 0.2s ease;
  font-size: 0.93rem;
}
.radio-group label:has(input:checked),
.checkbox-group label:has(input:checked) {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--primary-color);
  font-weight: bold;
  box-shadow: 0 0 0 2px rgba(0,86,179,0.1);
}

input[type="radio"],
input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.3);
  accent-color: var(--primary-color);
  width: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   10. AGREE / CONSENT BLOCK (STEP 1 & 9)
   ========================================================================== */
.agree-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agree-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid #DDDDDD;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.agree-item:has(input:checked) {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  box-shadow: 0 0 0 2px rgba(0,86,179,0.1);
}
.agree-item input[type="checkbox"] {
  margin: 2px 0 0 0;
  flex-shrink: 0;
}
.agree-item-text {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.6;
}
.agree-item:has(input:checked) .agree-item-text {
  color: var(--primary-color);
  font-weight: 600;
}

/* ==========================================================================
   10a. GATE SECTION（プラン条件確認 / 最終確認・送信）
   ========================================================================== */
.gate-section {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 24px 64px;
  background: linear-gradient(160deg, rgba(0, 86, 179, 0.05) 0%, rgba(255,255,255,0.85) 100%);
  border: var(--border-glass);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  text-align: center;
}

.gate-inner {
  width: 100%;
  max-width: 480px;
}

.gate-section h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.gate-section > .gate-inner > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 24px;
}

.gate-section .step-error-banner {
  text-align: left;
}

.gate-section .plan-conditions {
  text-align: left;
  margin-bottom: 20px;
}

.gate-section .agree-item {
  text-align: left;
}

.gate-section .form-group {
  margin-bottom: 20px;
}

.gate-section .btn-group {
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.gate-section .btn-prev {
  max-width: 100%;
}

@media (max-width: 480px) {
  .gate-section {
    min-height: calc(100vh - 140px);
    padding: 36px 16px 52px;
  }
  .gate-section h2 {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   10b. PLAN CONDITIONS LIST (STEP 1)
   ========================================================================== */
.plan-conditions {
  background: rgba(0, 86, 179, 0.04);
  border: 1px solid rgba(0, 86, 179, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
}
.plan-conditions ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
.plan-conditions ul li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.8;
}
.plan-conditions ul li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ==========================================================================
   11. CONDITIONAL INPUT
   ========================================================================== */
.conditional-input {
  display: none;
  margin-top: 12px;
  padding: 14px;
  background: rgba(0,86,179,0.03);
  border: 1px dashed rgba(0,86,179,0.25);
  border-radius: 8px;
}
.conditional-input.visible {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* ==========================================================================
   12. ERROR DISPLAY
   ========================================================================== */
.error-msg {
  display: none;
  color: var(--text-danger);
  font-size: 0.82rem;
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(211,47,47,0.05);
  border-radius: 6px;
  border: var(--border-danger);
}
.error-msg.visible {
  display: block;
}
input.error, select.error, textarea.error {
  border-color: #D32F2F !important;
  box-shadow: 0 0 0 2px rgba(211,47,47,0.15) !important;
}

.step-error-banner {
  display: none;
  background: rgba(211,47,47,0.07);
  border: var(--border-danger);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--text-danger);
  font-weight: 600;
}
.step-error-banner.visible {
  display: block;
}

/* ==========================================================================
   13. BUTTONS
   ========================================================================== */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 100px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  width: 100%;
  font-family: var(--font-base);
  letter-spacing: 0.03em;
}
.btn-primary {
  background: var(--primary-color);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(0,86,179,0.25);
}
.btn-primary:hover {
  background: #004494;
  box-shadow: 0 6px 18px rgba(0,86,179,0.3);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  background: #CCCCCC;
  color: #888888;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn-prev {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid #CCCCCC;
  max-width: 120px;
  flex-shrink: 0;
}
.btn-prev:hover {
  background: #F5F5F5;
}

/* ==========================================================================
   14. SUBMIT AREA
   ========================================================================== */
.submit-area {
  margin-top: 32px;
}
.submit-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
}
.sending-overlay {
  display: none;
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.sending-overlay.visible {
  display: block;
}

/* ==========================================================================
   15. PRIVACY LINK
   ========================================================================== */
.privacy-link-area {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.privacy-link-area a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.footer {
  text-align: center;
  padding: 20px 20px 30px;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  background: var(--bg-body);
  margin-top: 40px;
}
.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* ==========================================================================
   17. THANKS PAGE
   ========================================================================== */
.thanks-container {
  max-width: 560px;
  margin: 60px auto;
  padding: 0 20px 60px;
  text-align: center;
}
.thanks-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.thanks-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}
.thanks-body {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.9;
  text-align: left;
  margin-bottom: 32px;
}
.thanks-panel {
  background: var(--glass-bg);
  border: var(--border-glass);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  text-align: left;
  margin-bottom: 24px;
}

/* ==========================================================================
   18. PRIVACY PAGE
   ========================================================================== */
.privacy-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.privacy-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(0,86,179,0.15);
}
.privacy-header h1 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin: 0 0 8px;
}
.privacy-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.privacy-section {
  margin-bottom: 32px;
}
.privacy-section h2 {
  font-size: 1rem;
  color: var(--primary-color);
  border-bottom: 1px solid rgba(0,86,179,0.2);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.privacy-section p,
.privacy-section ul,
.privacy-section li {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.8;
}
.privacy-section ul {
  padding-left: 20px;
}
.back-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.88rem;
  margin-top: 8px;
}
.back-link::before {
  content: "← ";
}

/* ==========================================================================
   19. RESPONSIVE
   ========================================================================== */
@media (max-width: 480px) {
  .container {
    padding: 0 12px 60px 12px;
  }
  .glass-panel {
    padding: 20px 16px;
  }
  .btn {
    font-size: 0.95rem;
    min-height: 48px;
  }
  .step-label { font-size: 0.55rem; }
  .step-circle { width: 28px; height: 28px; font-size: 0.72rem; }
  .step-indicator-bar::before { top: 13px; }
  h2 {
    font-size: 1rem;
  }
}

/* ==========================================================================
   業種別最適化
   ========================================================================== */
.industry-hint {
  display: none;
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-top: 5px;
  margin-bottom: 0;
  padding: 4px 8px;
  background: rgba(0, 86, 179, 0.04);
  border-radius: 4px;
  line-height: 1.6;
}
.industry-hint.visible { display: block; }

.industry-tip-box {
  display: none;
  font-size: 0.8rem;
  color: #555;
  padding: 8px 12px;
  background: rgba(0, 86, 179, 0.05);
  border-left: 3px solid rgba(0, 86, 179, 0.3);
  border-radius: 0 6px 6px 0;
  margin-bottom: 12px;
  line-height: 1.6;
}
.industry-tip-box.visible { display: block; }

.is-hidden { display: none !important; }
