/* fieldset基本リセット */
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

/* fieldset特有のリセット */
fieldset {
  min-width: 0; /* IE11でのmin-width問題を修正 */
  border: none; /* デフォルトボーダーを削除 */
  padding: 0; /* デフォルトパディングを削除 */
  margin: 0; /* デフォルトマージンを削除 */
}

/* legendのリセット */
legend {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: inherit;
  color: inherit;
  white-space: normal;
  border: 0;
}

/* Webkit系ブラウザでの調整 */
fieldset {
  -webkit-margin-start: 0;
  -webkit-margin-end: 0;
  -webkit-padding-before: 0;
  -webkit-padding-start: 0;
  -webkit-padding-end: 0;
  -webkit-padding-after: 0;
}

/* モダンブラウザでの調整 */
fieldset {
  margin-inline-start: 0;
  margin-inline-end: 0;
  padding-block-start: 0;
  padding-inline-start: 0;
  padding-inline-end: 0;
  padding-block-end: 0;
}

/* フォーカス時のアウトライン削除（アクセシビリティを考慮して必要に応じて） */
fieldset:focus {
  outline: none;
}

/* =============================================================================
   LAYOUT COMPONENTS
   ============================================================================= */

/* Main Containers */
.konnyaku-register,
.konnyaku-login {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem 0;
}

.konnyaku-register__inner,
.konnyaku-login__inner {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 32px;
  box-sizing: border-box;
}

.konnyaku-terms {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.konnyaku-terms__inner {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 32px;
  box-sizing: border-box;
}

/* =============================================================================
   FORM COMPONENTS
   ============================================================================= */

/* Form Base */
.tml {
  width: 100%;
}

.tml-login {
  width: 100%;
}

/* Field Containers */
.tml .tml-field-wrap {
  margin-bottom: 1.5rem;
}

/* Message */
.tml-message {
  font-size: 14px;
}

/* Alert Messages */
.tml-alerts {
  font-size: 14px;
}

/* Labels */
.tml-legend,
.tml-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin: 0 0 .5rem 0;
}
.tml-legend {
  margin: 0;
}

/* Input Fields */
.tml-field,
.input {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #ffffff;
}

.tml-field:focus,
.input:focus {
  outline: none;
  border-color: rgb(251 146 60 / 1);
  box-shadow: rgb(255, 255, 255) 0px 0px 0px 0px, rgb(254, 215, 170) 0px 0px 0px 2px, rgba(0, 0, 0, 0) 0px 0px 0px 0px;
}

.tml-field::placeholder,
.input::placeholder {
  color: #9ca3af;
}

/* =============================================================================
   CHECKBOX COMPONENTS
   ============================================================================= */

/* Checkbox Wrappers */
.tml-rememberme-wrap,
.tml-declaration_1-wrap,
.tml-declaration_2-wrap,
.tml-participation_terms_agreement-wrap,
.tml-privacy_policy_agreement-wrap,
.tml-terms_agreement-wrap {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 8px;
}

/* Checkbox Inputs */
.tml-rememberme-wrap .tml-checkbox,
.tml-declaration_1-wrap .tml-checkbox,
.tml-declaration_2-wrap .tml-checkbox,
.tml-participation_terms_agreement-wrap .tml-checkbox,
.tml-privacy_policy_agreement-wrap .tml-checkbox,
.tml-terms_agreement-wrap .tml-checkbox {
  width: 16px !important;
  height: 16px !important;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Checkbox Labels */
.tml-rememberme-wrap .tml-label,
.tml-declaration_1-wrap .tml-label,
.tml-declaration_2-wrap .tml-label,
.tml-participation_terms_agreement-wrap .tml-label,
.tml-privacy_policy_agreement-wrap .tml-label,
.tml-terms_agreement-wrap .tml-label {
  margin: 0 !important;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  line-height: 1.4;
}

/* =============================================================================
   BUTTON COMPONENTS
   ============================================================================= */

.tml-button {
  width: 100%;
  background-color: #2563eb;
  color: white;
  padding: .5rem;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 24px;
}

.tml-button:hover {
  background-color: #1d4ed8;
}

.tml-button:active {
  background-color: #1e40af;
}

.tml-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* =============================================================================
   LINK COMPONENTS
   ============================================================================= */

.tml-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.tml-links li {
  display: inline-block;
  margin: 0 8px;
}

.tml-links a {
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.tml-links a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* =============================================================================
   ALERT COMPONENTS
   ============================================================================= */

.tml-alerts {
  margin-bottom: 16px;
}

/* Error Messages */
.tml-alerts .tml-alert {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  background-color: #fef2f2;
  color: #dc2626;
  font-size: 14px;
}

/* Success Messages */
.tml-alerts .tml-success {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #bbf7d0;
  background-color: #f0fdf4;
  color: #16a34a;
  font-size: 14px;
}

/* =============================================================================
   HEADER COMPONENTS
   ============================================================================= */

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header svg {
  width: 3rem;
  height: 3rem;
  color: #2563eb;
  margin: 0 auto 1rem;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-header h2 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.login-header p {
  color: #4b5563;
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.5rem;
}

/* =============================================================================
   CAPTCHA COMPONENTS
   ============================================================================= */

#xo-security-captcha {
  display: block;
  margin-bottom: .25rem;
}

/* Paragraph Styles */
.captcha-wrap p {
  margin: 0 0 .5rem 0;
}

.captcha-wrap p:has(#xo-security-captcha) {
  margin-bottom: 0;
}

.captcha-wrap p label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.captcha-wrap p label[for="xo_security_captcha"] {
  display: inline-block;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Icon Utilities */
.lucide {
  display: inline-block;
  vertical-align: middle;
}

.lucide-store {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =============================================================================
   SPECIFIC FORM ADJUSTMENTS
   ============================================================================= */

/* Form Specific Spacing */
.tml-address_group .tml-label {
  font-weight: normal;
}

.tml-postal_code_group-wrap {
  margin-bottom: 1em;
}

.tml-postal_code_group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tml-postal_code_group span {
  font-weight: normal;
}

.tml .tml-postal_code_group .tml-field-wrap {
  margin-bottom: 0;
}

.tml-postal_code_1-wrap {
  width: 5rem;
}
.tml-postal_code_2-wrap {
  width: 6rem;
}

.tml .tml-rememberme-wrap {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.tml .tml-submit-wrap {
  margin-top: .5rem;
  margin-bottom: 1.5rem;
}

.tml .tml-address_auto_fill_button-wrap .tml-button {
  margin-bottom: 0;
  padding: .5rem 1rem;
  font-weight: normal;
  font-size: 14px;
}

.tml .tml-submit-wrap .tml-button {
  margin-bottom: 0;
}

.tml.tml-register .tml-submit-wrap {
  margin-top: 0;
  margin-bottom: 0;
}

/* Form Descriptions */
.tml .tml-description {
  margin: .25rem 0 .5rem !important;
  font-style: normal !important;
  font-size: 12px !important;
  font-weight: normal;
  color: #4b5563;
}

.indicator-hint {
  font-size: 12px;
  font-weight: normal;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
  body {
    background: transparent;
  }

  .konnyaku-register,
  .konnyaku-login {
    padding: 0;
    max-width: 100%;
  }

  .konnyaku-register__inner,
  .konnyaku-login__inner {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 20px;
  }

  .konnyaku-terms {
    padding: 0;
    max-width: 100%;
  }

  .konnyaku-terms__inner {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 20px;
  }

  .login-header h2 {
    font-size: 1.25rem;
  }

  .tml-button {
    padding: 0.75rem;
    font-size: 16px;
  }
}


.acf-input-wrap {
  overflow: visible !important;
}