/* =============================================
 * 認定証申し込みフロー専用スタイル（cert-order.css）
 * 資格選択UI・アコーディオン・スライドパネル・
 * カウントダウン・フォーム・表示制御は本ファイルのみで完結
 * ============================================= */

/* =============================================
 * ラッパー
 * ============================================= */
.cert-flow-wrapper {
  padding-top: 56px;
  padding-bottom: 56px;
}

@media screen and (max-width: 480px) {
  .cert-flow-wrapper {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

/* =============================================
 * ステップインジケーター
 * ============================================= */
.cert-step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 48px auto;
  padding: 0;
  max-width: 800px;
  position: relative;
}

@media screen and (max-width: 480px) {
  .cert-step-indicator {
    margin-bottom: 32px;
  }
}

.cert-step-indicator::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #C4C4C4;
  z-index: 0;
}

.cert-step-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  z-index: 1;
}

.cert-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #C4C4C4;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

@media screen and (max-width: 480px) {
  .cert-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

.cert-step-label {
  font-size: 0.9rem;
  color: #A0AEC0;
  text-align: center;
  transition: color 0.3s ease;
}

@media screen and (max-width: 480px) {
  .cert-step-label {
    font-size: 0.75rem;
  }
}

.cert-step-item.is-active .cert-step-number {
  background: #108C67;
  box-shadow: 0 0 0 4px rgba(16, 140, 103, 0.1);
}

.cert-step-item.is-active .cert-step-label {
  color: #108C67;
  font-weight: 600;
}

.cert-step-item.is-completed .cert-step-number {
  background: #55A990;
}

.cert-step-item.is-completed .cert-step-label {
  color: #55A990;
}

/* =============================================
 * 資格カテゴリセクション（認定証申込み専用）
 * ============================================= */
.cert-qualification-section .cert-category-section {
  margin-bottom: 16px;
}

.cert-qualification-section .cert-category-header {
  margin: 0 0 20px 0;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1A202C;
  background: linear-gradient(135deg, #F7FAFC 0%, #EDF2F7 100%);
  border-left: 4px solid #108C67;
}

@media screen and (max-width: 480px) {
  .cert-qualification-section .cert-category-header {
    padding: 12px 16px;
    font-size: 1rem;
  }
}

.cert-qualification-section .cert-exam-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media screen and (max-width: 480px) {
  .cert-qualification-section .cert-exam-list {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 480px) {
  .cert-qualification-section .cert-category-section .cert-exam-list {
    margin-top: 8px;
    height: 0;
    overflow: hidden;
    transition: height 0.25s ease;
    box-sizing: border-box;
  }

  .cert-qualification-section .cert-category-header {
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 36px;
  }

  .cert-qualification-section .cert-category-header::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.25s ease;
  }

  .cert-qualification-section .cert-category-section.is-open .cert-category-header::after {
    transform: translateY(-50%) rotate(180deg);
  }
}

.cert-qualification-section .cert-exam-item {
  position: relative;
}

.cert-qualification-section .cert-exam-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.cert-qualification-section .cert-exam-item input[type="checkbox"]:checked + .cert-exam-label {
  background: rgba(16, 140, 103, 0.05);
  border-color: #108C67;
}

.cert-qualification-section .cert-exam-item input[type="checkbox"]:checked + .cert-exam-label .cert-exam-checkbox-icon::before {
  background: #108C67;
  border-color: #108C67;
}

.cert-qualification-section .cert-exam-item input[type="checkbox"]:checked + .cert-exam-label .cert-exam-checkbox-icon::after {
  opacity: 1;
  transform: scale(1);
}

.cert-qualification-section .cert-exam-label {
  display: flex;
  align-items: center;
  padding: 18px 24px 18px 60px;
  background: #FAFAFA;
  border: 2px solid #E0E0E0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.cert-qualification-section .cert-exam-label:hover {
  background: rgba(16, 140, 103, 0.02);
  border-color: #108C67;
}

@media screen and (max-width: 480px) {
  .cert-qualification-section .cert-exam-label {
    padding: 16px 20px 16px 52px;
  }
}

.cert-qualification-section .cert-exam-checkbox-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

@media screen and (max-width: 480px) {
  .cert-qualification-section .cert-exam-checkbox-icon {
    left: 20px;
  }
}

.cert-qualification-section .cert-exam-checkbox-icon::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid #E0E0E0;
  border-radius: 3px;
  background: #fff;
  transition: all 0.2s ease;
}

.cert-qualification-section .cert-exam-checkbox-icon::after {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.cert-qualification-section .cert-exam-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1b1d20;
}

@media screen and (max-width: 480px) {
  .cert-qualification-section .cert-exam-name {
    font-size: 0.9rem;
  }
}

/* =============================================
 * 認定証種別選択セクション
 * ============================================= */
.cert-type-section {
  margin: 0 auto 32px auto;
  padding: 32px;
  background: #FFFFFF;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 96%;
}

@media screen and (max-width: 480px) {
  .cert-type-section {
    padding: 24px 16px;
  }
}

.cert-type-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media screen and (max-width: 480px) {
  .cert-type-list {
    grid-template-columns: 1fr;
  }
}

.cert-type-item {
  position: relative;
}

.cert-type-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.cert-type-item input[type="checkbox"]:checked + .cert-type-label {
  background: rgba(16, 140, 103, 0.05);
  border-color: #108C67;
}

.cert-type-item input[type="checkbox"]:checked + .cert-type-label .cert-type-checkbox-icon::before {
  background: #108C67;
  border-color: #108C67;
}

.cert-type-item input[type="checkbox"]:checked + .cert-type-label .cert-type-checkbox-icon::after {
  opacity: 1;
  transform: scale(1);
}

.cert-type-label {
  display: flex;
  align-items: center;
  padding: 20px 24px 20px 60px;
  background: #FAFAFA;
  border: 2px solid #E0E0E0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.cert-type-label:hover {
  background: rgba(16, 140, 103, 0.02);
  border-color: #108C67;
}

.cert-type-checkbox-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.cert-type-checkbox-icon::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid #E0E0E0;
  border-radius: 3px;
  background: #fff;
  transition: all 0.2s ease;
}

.cert-type-checkbox-icon::after {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.cert-type-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cert-type-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
}

.cert-type-price {
  font-size: 0.9rem;
  color: #888;
  font-weight: 600;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* =============================================
 * セクションタイトル
 * ============================================= */
.cert-section-title {
  margin: 0 0 24px 0;
  padding-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1A202C;
  border-bottom: 2px solid #108C67;
}

@media screen and (max-width: 480px) {
  .cert-section-title {
    font-size: 1.1rem;
  }
}

.cert-section-title.is-required::after {
  content: "必須";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #E53E3E;
  border-radius: 3px;
}

/* =============================================
 * フォームテーブル（入力画面）
 * ============================================= */
/* yubinbango用の非表示クラス */
.p-country-name {
  display: none;
}

.cert-input-section,
.cert-payment-section,
.cert-qualification-section {
  margin: 0 auto 32px auto;
  padding: 32px;
  background: #FFFFFF;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 96%;
}

@media screen and (max-width: 480px) {
  .cert-input-section,
  .cert-payment-section,
  .cert-qualification-section {
    padding: 24px 16px;
  }
}

.cert-form-table {
  width: 100%;
  border-collapse: collapse;
}

.cert-form-table tr {
  border-bottom: 1px solid #E2E8F0;
}

.cert-form-table tr:last-child {
  border-bottom: none;
}

.cert-form-table th {
  padding: 20px 16px;
  font-weight: 600;
  text-align: left;
  color: #1A202C;
  background: #FAFAFA;
  width: 30%;
  vertical-align: top;
}

@media screen and (max-width: 480px) {
  .cert-form-table th {
    display: block;
    width: 100%;
    padding: 16px;
    background: transparent;
    border-bottom: none;
  }
}

.cert-form-table th.is-required::after {
  content: "必須";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #E53E3E;
  border-radius: 3px;
  vertical-align: middle;
}

.cert-form-table td {
  padding: 20px 16px;
  color: #4A5568;
}

@media screen and (max-width: 480px) {
  .cert-form-table td {
    display: block;
    padding: 8px 16px 24px 16px;
  }
}

.cert-form-input,
.cert-form-select,
.cert-form-textarea {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  color: #1A202C;
  background: #fff;
  border: 2px solid #E0E0E0;
  border-radius: 4px;
  transition: all 0.2s ease;
}

@media screen and (max-width: 480px) {
  .cert-form-input,
  .cert-form-select,
  .cert-form-textarea {
    font-size: 16px;
  }
}

.cert-form-input:focus,
.cert-form-select:focus,
.cert-form-textarea:focus {
  outline: none;
  border-color: #108C67;
  box-shadow: 0 0 0 3px rgba(16, 140, 103, 0.1);
}

.cert-form-input.error,
.cert-form-select.error,
.cert-form-textarea.error {
  border-color: #E53E3E;
  background: #FFF5F5;
}

.cert-form-textarea {
  min-height: 120px;
  resize: vertical;
}

.cert-form-error {
  margin-top: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #C53030;
  background: #FFF5F5;
  border-left: 3px solid #E53E3E;
  border-radius: 3px;
  display: none;
}

.cert-form-error:not(:empty) {
  display: block;
}

.cert-zip-group {
  display: flex;
  gap: 16px;
}

@media screen and (max-width: 480px) {
  .cert-zip-group {
    flex-direction: column;
  }
}

.cert-zip-input {
  flex: 1;
}

.cert-zip-button {
  padding: 16px 24px;
  white-space: nowrap;
  background: #BC4C1B;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cert-zip-button:hover:not(:disabled) {
  background: #9A3D15;
}

@media screen and (max-width: 480px) {
  .cert-zip-button {
    width: 100%;
  }
}

/* =============================================
 * 支払い方法選択
 * ============================================= */
.cert-payment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cert-payment-item {
  position: relative;
}

.cert-payment-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.cert-payment-item input[type="radio"]:checked + .cert-payment-label {
  background: rgba(16, 140, 103, 0.05);
  border-color: #108C67;
}

.cert-payment-item input[type="radio"]:checked + .cert-payment-label .cert-payment-radio-icon::before {
  border-color: #108C67;
}

.cert-payment-item input[type="radio"]:checked + .cert-payment-label .cert-payment-radio-icon::after {
  opacity: 1;
  transform: scale(1);
}

.cert-payment-label {
  display: block;
  padding: 24px;
  background: #FAFAFA;
  border: 2px solid #E0E0E0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media screen and (max-width: 480px) {
  .cert-payment-label {
    padding: 16px;
  }
}

.cert-payment-label:hover {
  background: rgba(16, 140, 103, 0.02);
  border-color: #108C67;
}

.cert-payment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cert-payment-radio-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cert-payment-radio-icon::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid #E0E0E0;
  border-radius: 50%;
  background: #fff;
  transition: all 0.2s ease;
}

.cert-payment-radio-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #108C67;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.cert-payment-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1A202C;
}

.cert-payment-description {
  font-size: 0.9rem;
  color: #4A5568;
  line-height: 1.6;
  margin: 0;
}

.cert-payment-detail {
  padding-left: 32px;
}

@media screen and (max-width: 480px) {
  .cert-payment-detail {
    padding-left: 0;
  }
}

.cert-credit-fields {
  margin-top: 16px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: none;
}

.cert-payment-item input[type="radio"]:checked + .cert-payment-label .cert-credit-fields {
  display: block;
}

.cert-credit-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFF;
}

.cert-credit-table tr {
  border-bottom: 1px solid #F0F0F0;
}

.cert-credit-table tr:last-child {
  border-bottom: none;
}

.cert-credit-table th {
  padding: 20px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  color: #1A202C;
  background: #FEF9F5;
  width: 180px;
  vertical-align: middle;
}

@media screen and (max-width: 480px) {
  .cert-credit-table th {
    display: block;
    width: 100%;
    padding: 16px;
    background: #FEF9F5;
    border-bottom: none;
  }
}

.cert-credit-table td {
  padding: 20px 16px;
  background: #FFF;
  vertical-align: middle;
}

.cert-credit-table td .cert-form-select#dealing {
  max-width: 200px;
}

.cert-credit-payment-method-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

@media screen and (max-width: 480px) {
  .cert-credit-table td {
    display: block;
    width: 100%;
    padding: 8px 16px 24px 16px;
  }
  
  .cert-credit-table td .cert-form-select#dealing {
    max-width: 100%;
  }
  
  .cert-credit-payment-method-wrapper {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.cert-credit-name-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media screen and (max-width: 480px) {
  .cert-credit-name-inputs {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.cert-credit-name-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-credit-sublabel {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4A5568;
}

.cert-credit-expiration-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 300px;
}

@media screen and (max-width: 480px) {
  .cert-credit-expiration-inputs {
    max-width: 100%;
    gap: 12px;
  }
}

.cert-credit-expiration-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-credit-table #security_code {
  max-width: 120px;
}

@media screen and (max-width: 480px) {
  .cert-credit-table #security_code {
    max-width: 100px;
  }
}

.cert-credit-divide-group {
  display: none;
  align-items: center;
  gap: 16px;
  margin: 0;
  vertical-align: middle;
}

.cert-credit-divide-group .cert-credit-sublabel {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: #1A202C;
  line-height: 1;
}

.cert-credit-divide-group .cert-form-select {
  max-width: 160px;
  min-width: 160px;
  flex: 0 0 auto;
}

@media screen and (max-width: 480px) {
  .cert-credit-divide-group {
    gap: 12px;
  }
  
  .cert-credit-divide-group .cert-form-select {
    max-width: 140px;
    min-width: 140px;
  }
}

.cert-credit-card-image {
  margin: 16px 0;
}

.cert-credit-card-image img {
  max-width: 40%;
  height: auto;
}

@media screen and (max-width: 480px) {
  .cert-credit-card-image img {
    margin: 8px auto;
    max-width: 90%;
  }
}

/* =============================================
 * 確認・完了・その他
 * ============================================= */
.cert-confirm-section {
  margin: 0 auto 32px auto;
  padding: 32px;
  width: 96%;
  background: #FFFFFF;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media screen and (max-width: 480px) {
  .cert-confirm-section {
    margin: 0 auto 8px auto;
    padding: 24px 16px;
    width: 96%;
  }
}

.cert-selected-items {
  margin-bottom: 24px;
}

/* =============================================
 * 確認画面専用スタイル（cert-selected-item）
 * ============================================= */
.cert-selected-item {
  display: flex;
  align-items: stretch;
  margin-bottom: 20px;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
}

.cert-selected-item:last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 480px) {
  .cert-selected-item {
    flex-direction: column;
  }
}

.cert-selected-item .cert-selected-qualification {
  flex-shrink: 0;
  width: 45%;
  padding: 24px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1A202C;
  line-height: 1.5;
  background: #FAFAFA;
  display: flex;
  align-items: center;
}

@media screen and (max-width: 480px) {
  .cert-selected-item .cert-selected-qualification {
    width: 100%;
    padding: 18px 20px;
    font-size: 1rem;
  }
}

.cert-selected-item .cert-selected-types {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 12px;
  background: #FFFFFF;
}

@media screen and (max-width: 480px) {
  .cert-selected-item .cert-selected-types {
    padding: 16px 20px;
  }
}

.cert-selected-item .cert-selected-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #F9FAFB;
  /* border-left: 3px solid #E2E8F0; */
  /* border-radius: 4px; */
  transition: all 0.2s ease;
}

.cert-selected-item .cert-selected-type-row:hover {
  border-left-color: #108C67;
  background: #F0FFF4;
}

@media screen and (max-width: 480px) {
  .cert-selected-item .cert-selected-type-row {
    padding: 10px 14px;
  }
}

.cert-selected-item .cert-selected-type-name {
  font-size: 1rem;
  font-weight: 600;
  color: #2D3748;
  flex: 1;
}

@media screen and (max-width: 480px) {
  .cert-selected-item .cert-selected-type-name {
    font-size: 0.95rem;
  }
}

.cert-selected-item .cert-selected-type-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #108C67;
  white-space: nowrap;
  margin-left: 20px;
}

@media screen and (max-width: 480px) {
  .cert-selected-item .cert-selected-type-price {
    font-size: 1rem;
    margin-left: 16px;
  }
}

/* =============================================
 * 入力画面専用スタイル（cert-selected-item-row）
 * ============================================= */
.cert-selected-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 20px 24px;
  background: #F9FAFB;
  border-radius: 4px;
}

@media screen and (max-width: 480px) {
  .cert-selected-item-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }
}

.cert-selected-item-row:last-child {
  margin-bottom: 0;
}

.cert-selected-item-row .cert-selected-qualification {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1A202C;
  line-height: 1.6;
}

@media screen and (max-width: 480px) {
  .cert-selected-item-row .cert-selected-qualification {
    font-size: 1rem;
    width: 100%;
  }
}

.cert-selected-item-row .cert-selected-types {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

@media screen and (max-width: 480px) {
  .cert-selected-item-row .cert-selected-types {
    width: 100%;
    align-items: stretch;
  }
}

.cert-selected-item-row .cert-selected-type-item {
  display: grid;
  grid-template-columns: auto auto;
  gap: 48px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #1A202C;
}

@media screen and (max-width: 480px) {
  .cert-selected-item-row .cert-selected-type-item {
    grid-template-columns: 1fr auto;
    gap: 16px;
    font-size: 0.95rem;
  }
}

.cert-selected-item-row .cert-type-name {
  font-weight: bold;
  color: #3c3d3f;
  text-align: right;
}

@media screen and (max-width: 480px) {
  .cert-selected-item-row .cert-type-name {
    text-align: left;
    font-size: 1rem;
  }
}

.cert-selected-item-row .cert-type-price {
  font-size: 1rem;
  font-weight: normal;
  color: #1A202C;
  white-space: nowrap;
  text-align: right;
}

@media screen and (max-width: 480px) {
  .cert-selected-item-row .cert-type-price {
    font-size: 0.95rem;
  }
}

.cert-total-price-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #F0FFF4;
  border-radius: 4px;
  margin-top: 24px;
}

.cert-total-price-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1A202C;
}

.cert-total-price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #108C67;
}

@media screen and (max-width: 480px) {
  .cert-total-price-label {
    font-size: 1rem;
  }
  .cert-total-price-value {
    font-size: 1.3rem;
  }
}

.cert-confirm-table {
  width: 100%;
  border-collapse: collapse;
}

.cert-confirm-table tr {
  border-bottom: 1px solid #E2E8F0;
}

.cert-confirm-table tr:last-child {
  border-bottom: none;
}

.cert-confirm-table th {
  padding: 16px 24px;
  font-weight: 600;
  text-align: left;
  color: #1A202C;
  background: #FAFAFA;
  width: 30%;
  vertical-align: top;
}

@media screen and (max-width: 480px) {
  .cert-confirm-table th {
    display: block;
    width: 100%;
    padding: 16px;
    background: transparent;
    border-bottom: none;
  }
}

.cert-confirm-table td {
  padding: 16px 24px;
  color: #33363b;
}

@media screen and (max-width: 480px) {
  .cert-confirm-table td {
    display: block;
    padding: 8px 16px 24px 16px;
  }
}

.cert-notice-box {
  margin: 0 auto 32px auto;
  padding: 24px;
  width: 70%;
  /* background: #FFF9E6; */
  background: #f1f1f1;
  text-align: center;
  /* border-left: 4px solid #F59E0B; */
  border-radius: 4px;
}

@media screen and (max-width: 480px) {
  .cert-notice-box {
    margin-top: 16px;
    width: 96%;
  }
}

.cert-notice-title {
  font-weight: 600;
  color: #1A202C;
  margin-bottom: 12px;
}

.cert-notice-text {
  font-size: 0.9rem;
  color: #4A5568;
  line-height: 1.6;
}

/* 確認画面：支払い方法表示 */
.cert-payment-display {
  padding: 16px;
  background: #f9f9f9;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  text-align: center;
}

.cert-button-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
}

@media screen and (max-width: 480px) {
  .cert-button-area {
    flex-direction: column-reverse;
    gap: 16px;
  }
}

.cert-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 48px;
}

@media screen and (max-width: 480px) {
  .cert-button {
    width: 96%;
    min-height: 44px;
    padding: 16px 24px;
  }
}

.cert-button:disabled {
  background: #D1D5DB;
  color: #A0AEC0;
  cursor: not-allowed;
}

.cert-button-primary {
  background: #BC4C1B;
  color: #fff;
  min-width: 240px;
}

.cert-button-primary:hover:not(:disabled) {
  background: #9A3D15;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 480px) {
  .cert-button-primary {
    min-width: auto;
  }
}

.cert-button-secondary {
  background: #6B7280;
  color: #fff;
}

.cert-button-secondary:hover:not(:disabled) {
  background: #4B5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cert-progress-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 16px 24px;
  background: #FFF9E6;
  border-radius: 4px;
  border-left: 4px solid #F59E0B;
}

.cert-progress-text {
  font-size: 0.9rem;
  color: #1A202C;
  font-weight: 600;
}

.cert-progress-count {
  font-size: 1rem;
  color: #BC4C1B;
  font-weight: 700;
}

.cert-complete-section {
  text-align: center;
  padding: 64px 24px;
}

/* エラー時のスタイル */
.cert-complete-section.is-error {
  border-color: #D21717;
}

.cert-complete-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px auto;
  border-radius: 50%;
  background: #F0FFF4;
  border: 3px solid #38A169;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #38A169;
}

.cert-complete-icon::after {
  content: "✓";
}

/* エラー時のアイコンスタイル */
.cert-complete-icon.is-error {
  background: #D21717;
  border-color: #D21717;
  color: #fff;
}

.cert-complete-icon.is-error::after {
  content: "✕";
}

.cert-complete-title {
  margin: 0 0 24px 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1A202C;
}

@media screen and (max-width: 480px) {
  .cert-complete-title {
    font-size: 1.4rem;
  }
}

.cert-complete-message {
  font-size: 1rem;
  color: #4A5568;
  line-height: 1.8;
  margin-bottom: 32px;
}

.cert-complete-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #108C67;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cert-complete-link:hover {
  background: #0D7052;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* =============================================
 * 完了画面・エラー画面スタイル（order-redesign.css準拠）
 * ============================================= */
.complete-message,
.error-message {
  text-align: center;
  padding: 64px 24px;
  background: #FFFFFF;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin: 0 auto;
  max-width: 800px;
}

@media screen and (max-width: 480px) {
  .complete-message,
  .error-message {
    padding: 48px 16px;
  }
}

.complete-message .icon-success,
.error-message .icon-error {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.complete-message .icon-success {
  background: #F0FFF4;
  border: 3px solid #38A169;
  color: #38A169;
}

.complete-message .icon-success::after {
  content: "✓";
}

.error-message .icon-error {
  background: #FFF5F5;
  border: 3px solid #E53E3E;
  color: #E53E3E;
}

.error-message .icon-error::after {
  content: "✕";
}

.complete-message .message-title {
  margin: 0 0 24px 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1A202C;
}

.error-message .message-title {
  margin: 0 0 24px 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #C53030;
}

@media screen and (max-width: 480px) {
  .complete-message .message-title,
  .error-message .message-title {
    font-size: 1.4rem;
  }
}

.complete-message .message-text,
.error-message .message-text {
  margin: 0 auto 48px auto;
  max-width: 600px;
  font-size: 1rem;
  color: #4A5568;
  line-height: 1.8;
}

@media screen and (max-width: 480px) {
  .complete-message .message-text,
  .error-message .message-text {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }
}

.complete-message .cta-buttons,
.error-message .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

@media screen and (max-width: 480px) {
  .complete-message .cta-buttons,
  .error-message .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}

body:has(#order_exam.is-cert-page) .order-container {
  margin-top: 0;
}

@media screen and (max-width: 480px) {
  body:has(#order_exam.is-cert-page) .order-container {
    margin-top: 0;
  }
}

/* =============================================
 * スライドインパネル
 * ============================================= */
.cert-slide-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  transition: bottom 0.3s ease, opacity 0.3s ease;
}

.cert-slide-panel.is-visible {
  bottom: 0;
  opacity: 1;
}

.cert-slide-panel-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cert-slide-panel-content {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.cert-slide-panel-info {
  display: flex;
  gap: 48px;
  flex: 1;
}

@media screen and (max-width: 480px) {
  .cert-slide-panel-info {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 32px;
    width: 100%;
  }
  .cert-slide-panel-info .cert-slide-panel-item {
    flex: 1;
    min-width: 0;
  }
}

@media screen and (max-width: 480px) {
  .cert-slide-panel-inner {
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
  }
  .cert-slide-panel-content {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  .cert-slide-panel-price {
    width: 100%;
  }
  .cert-slide-panel-price-value {
    font-size: 1.2rem;
  }
  .cert-slide-panel-action {
    width: 100%;
  }
  .cert-slide-panel-button {
    width: 100%;
    min-height: 44px;
  }
}

.cert-slide-panel-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-slide-panel-label {
  font-size: 0.8rem;
  color: #535b67;
  font-weight: 500;
  line-height: 1;
}

.cert-slide-panel-value {
  font-size: 0.95rem;
  color: #1A202C;
  font-weight: 600;
  display: flex;
  align-items: center;
  line-height: 1.4;
  min-height: 1.96rem;
}

#cert-slide-panel .cert-panel-count-num {
  font-size: 1.4rem;
  color: #108C67;
  font-weight: 700;
  line-height: 1;
  margin-right: 0.2em;
}

.cert-slide-panel-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-slide-panel-price-label {
  font-size: 0.85rem;
  color: #108C67;
  font-weight: 600;
}

.cert-slide-panel-price-value {
  font-size: 1.4rem;
  color: #108C67;
  font-weight: 700;
}

.cert-slide-panel-price-value .cert-panel-tax-note {
  font-size: 0.75em;
  font-weight: 600;
}

.cert-slide-panel-action {
  flex-shrink: 0;
}

.cert-slide-panel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #108C67;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  min-height: 48px;
  white-space: nowrap;
}

.cert-slide-panel-button:hover {
  background: #0D7052;
  transform: translateY(-1px);
}

#input-progress {
  display: none;
}

#form_checker {
  display: none;
  position: fixed;
  top: 100px;
  right: 0;
  bottom: auto;
  left: auto;
  padding: 8px 12px;
  min-width: 120px;
  font-size: 0.8rem;
  color: #4A5568;
  text-align: center;
  border-radius: 8px 0 0 8px;
  background: rgba(235, 107, 164, 0.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  pointer-events: none;
}

#form_checker .form_check-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4A5568;
}

#form_checker .form_check-text #check-number {
  color: #108C67;
  font-size: 1rem;
  font-weight: 700;
}

/* =============================================
 * ヘッダー PC/SP 切替
 * ============================================= */
.order_pc_header {
  margin: 0 auto;
  padding: 0;
  width: 100%;
  height: 60px;
  display: block;
}

.order_pc_header .header_wrapper {
  margin: 0 auto;
  padding: 0;
  width: 1200px;
}

.order_pc_header .header_wrapper .main_logo {
  margin: 0;
  padding: 0;
  width: 40%;
  height: 100%;
}

.order_pc_header .header_wrapper .main_logo > a {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 60px;
}

.order_pc_header .header_wrapper .main_logo > a > img {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

.order_sp_header {
  display: none;
}

@media screen and (max-width: 480px) {
  .order_pc_header {
    display: none;
  }
  
  .order_sp_header {
    display: block;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    height: 50px;
  }
  
  .order_sp_header .main_logo {
    margin: 0 auto;
    padding: 0;
    width: 94%;
    height: 100%;
  }
  
  .order_sp_header .main_logo > a {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 60%;
    height: 50px;
  }
  
  .order_sp_header .main_logo > a > img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
  }
}
