@charset "UTF-8";

/* ===== Variables ===== */
:root {
  --brand-dark:   #1A3C6E;
  --brand-mid:    #1A6FAA;
  --accent:       #2B7FE0;
  --accent-light: #EBF4FF;
  --text-dark:    #0f172a;
  --text-body:    #334155;
  --text-muted:   #94a3b8;
  --border:       #e2e8f0;
  --bg:           #f8fafc;
  --white:        #ffffff;
  --error:        #ef4444;
  --success:      #10b981;
  --warn:         #92600a;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== Page ===== */
#_content {
  min-height: calc(100vh - 60px);
  background: var(--bg);
}

#_estimate {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ===== Hero ===== */
._hero {
  margin-bottom: 40px;
}

._badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(43, 127, 224, 0.35);
  border-radius: 100px;
}

._hero h1 {
  margin: 0 0 12px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.02em;
}

._lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-body);
}

/* ===== Layout ===== */
._estimate-wrap {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

._input-panel {
  flex: 1;
  min-width: 0;
}

._summary-panel {
  position: sticky;
  top: 80px;
  width: 360px;
  flex-shrink: 0;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* ===== Sections ===== */
._section {
  margin-bottom: 32px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
}

._section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

._step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--white);
  background: var(--brand-dark);
  border-radius: 50%;
  flex-shrink: 0;
}

._multi {
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 100px;
}

/* ===== サービス選択 ===== */
._group-divider {
  margin: 20px 0;
  border-top: 1px solid var(--border);
}

/* パネル幅に応じて列数が自動で変わる（広い画面で3列 → タブレット2列 → スマホ1列） */
._plugin-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

._plugin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 14px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

._plugin-item:hover {
  border-color: var(--accent);
}

._plugin-item._selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

._plugin-item input[type="checkbox"] {
  display: none;
}

._plugin-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: contain;
}

._plugin-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

._plan-item ._plugin-name {
  font-weight: 700;
}

._plugin-price {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-mid);
  white-space: nowrap;
}

._plugin-price small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ===== 宛名・送付先 ===== */
._field {
  margin-bottom: 20px;
}

._field:last-child {
  margin-bottom: 0;
}

._field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
}

._field input[type="text"],
._field input[type="email"] {
  width: 100%;
  max-width: 420px;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}

._field input[type="text"]:focus,
._field input[type="email"]:focus {
  border-color: var(--accent);
}

._field-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 見積内容 ===== */
._summary-panel h2 {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

._empty {
  margin: 0 0 20px;
  padding: 32px 0;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  color: var(--text-muted);
}

._summary-table {
  width: 100%;
  margin-bottom: 16px;
  border-collapse: collapse;
  font-size: 13px;
}

._summary-table th {
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

._summary-table th:not(:first-child) {
  text-align: right;
}

._summary-table td {
  padding: 10px 4px;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

._summary-table td small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

._summary-table ._num {
  text-align: right;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}

/* ===== 合計 ===== */
._totals {
  margin-bottom: 20px;
}

._total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--text-body);
}

._total-row span:last-child {
  font-family: 'DM Sans', sans-serif;
}

._total-row._grand {
  margin-top: 4px;
  padding-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  border-top: 2px solid var(--text-dark);
}

/* ===== 注意 / エラー / ボタン ===== */
._warn {
  margin-bottom: 12px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--warn);
  background: rgba(241, 134, 11, 0.08);
  border-radius: 8px;
}

._error {
  margin-bottom: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--error);
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
}

._download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: var(--brand-dark);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

._download-btn:hover {
  background: var(--brand-mid);
}

._notes {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

._notes li {
  font-size: 11px;
  line-height: 1.9;
  color: var(--text-muted);
}

/* ===== 送信完了 ===== */
#_send {
  padding: 32px 0;
  text-align: center;
}

._send-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
}

._send-title {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

._send-sub {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-body);
  word-break: break-all;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  ._estimate-wrap {
    flex-direction: column;
  }

  ._summary-panel {
    position: static;
    width: 100%;
  }
}

@media (max-width: 600px) {
  #_estimate {
    padding: 32px 16px 60px;
  }

  ._hero h1 {
    font-size: 24px;
  }

  ._section {
    padding: 20px;
  }
}
