/* Design System Variables */
:root {
  /* Colors */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-gray-50: #f3f3f3;
  --color-gray-100: #e5e5e5;
  --color-gray-200: #d5d5d5;
  --color-gray-400: #939393;
  --color-gray-600: #616161;
  --color-gray-777: #777777;
  --color-gray-900: #1e1e1e;
  --color-orange: #ff9900;
  --color-orange-900: #462827;
  
  /* Background */
  --color-background: #ffffff;
  --color-border: #e5e5e5;
  
  /* Typography */
  --font-family-japanese: 'Noto Sans JP', sans-serif;
  --font-family-system: 'SF Pro Text', sans-serif;
  
  --font-size-10: 10px;
  --font-size-12: 12px;
  --font-size-14: 14px;
  --font-size-16: 16px;
  --font-size-20: 20px;
  
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-100: 1;
  --line-height-120: 1.2;
  --line-height-150: 1.5;
  
  /* Spacing */
  --space-50: 4px;
  --space-100: 8px;
  --space-150: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-600: 48px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-14);
  line-height: var(--line-height-150);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container Styles */
.container {
  width: 100%;
  max-width: 430px;
  min-width: 320px;
  margin: 0 auto;
  background: white;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
  padding: 0 16px;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

#registration-view.active {
  display: block;
}

#confirmation-view.active {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  z-index: 100;
  overflow-y: auto;
}

#thanks-view.active {
  display: block;
}

/* Logo */
.logo-container {
  display: flex;
  justify-content: center;
  padding: 24px 8px;
}

.logo {
  width: 180px;
  height: 60px;
  object-fit: contain;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
  padding: 0;
}

.step-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  gap: 0;
  width: 100%;
  padding: 16px 0px 0px 0px;
}

.step-container {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

.step-wrapper {
  display: flex;
  background-color: var(--color-gray-50);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 16px 4px 4px 4px;
}

.step-wrapper.active {
  background-color: var(--color-white);
  border: 2px solid var(--color-orange-900);
  box-sizing: border-box;
}

.step-wrapper.active .step-box {
  top: -7px;
  left: -7px;
}

.step-wrapper.completed {
  background-color: var(--color-gray-50);
}

.step-box {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-gray-200);
}

.step-box.active {
  background-color: var(--color-orange-900);
}

.step-box.completed {
  background-color: var(--color-orange-900);
}

.step-number {
  font-family: 'PT Serif', serif;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.step-box.active .step-number {
  color: var(--color-white);
}

.step-box.completed .step-number {
  color: var(--color-white);
}

.step-label {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  color: var(--color-gray-400);
  text-align: center;
  white-space: nowrap;
  margin-bottom: 8px;
}

.step-wrapper.active .step-label {
  font-weight: var(--font-weight-bold);
  color: var(--color-orange-900);
  line-height: 1.2;
}

.step-line {
  width: 21px;
  height: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-bold);
  line-height: 1.5;
  color: var(--color-orange-900);
  text-align: left;
  width: 100%;
  margin-bottom: 8px;
  padding: 0px 0px 16px 0px
}

.step-caption {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  color: var(--color-gray-900);
  text-align: left;
  width: 100%;
  margin-bottom: 24px;
}

.step-divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-gray-100);
  margin-bottom: 32px;
}

.caption {
  text-align: center;
  color: var(--color-gray-600);
  font-size: var(--font-size-14);
}

/* Label Caption - Figma Design System */
.label-caption {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-10);
  font-weight: var(--font-weight-regular);
  color: var(--color-gray-600);
  line-height: var(--line-height-150);
  width: 100%;
}

.header h2 {
  text-align: center;
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-top: var(--space-200);
}

/* Form Styles */
.form-body {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 0 0px 48px 0px;
  width: 100%;
  max-width: 358px;
  margin: 0 auto;
}

/* Form Group Styles */
.form-group {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  min-height: 48px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.address-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.form-label-container {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  font-weight: var(--font-weight-bold);
}

.form-input-container {
  flex: 1;
  min-width: 0;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-50);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-gray-900);
  line-height: 1.4;
  width: 100%;
}

.form-label-vertical {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-gray-900);
  line-height: 1.4;
  width: 100%;
}

/* Email field specific styling - right align required badge */
.form-label-vertical .required {
  align-self: flex-end;
}

.form-input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.label-text {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-regular);
  color: var(--color-gray-900);
  line-height: var(--line-height-150);
}

/* Special styling for contact method and consent sections */
.form-section .form-label {
  justify-content: flex-start;
}


/* Override for name fields - keep them with space-between layout */
.form-group .form-label {
  justify-content: space-between;
}

.privacy-section .label-text {
  min-width: 100px;
}

.required-badge {
  background-color: var(--color-orange-900);
  color: var(--color-white);
  font-size: var(--font-size-10);
  font-weight: var(--font-weight-regular);
  padding: 4px;
  margin-left: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: fit-content;
}

.required {
  background-color: #462827;
  color: white;
  font-size: 10px;
  font-weight: 400;
  padding: 4px;
  border-radius: 2px;
  line-height: 1;
  white-space: nowrap;
}


/* Form Inputs */
.form-input {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 0;
  font-size: 12px; /* Increased to 16px to prevent zoom on iOS */
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  background-color: #f3f3f3 !important;
  color: #939393;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: 48px;
  box-sizing: border-box;
  line-height: 1.5;
  transition: all 0.2s ease;
}

/* Override browser autofill styles */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #f3f3f3 inset !important;
  -webkit-text-fill-color: #939393 !important;
  background-color: #f3f3f3 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.form-input:-webkit-autofill:not(:placeholder-shown) {
  -webkit-text-fill-color: #1e1e1e !important;
}

.form-input:not(:placeholder-shown) {
  color: #1e1e1e !important;
}

.form-input:not(:placeholder-shown):-webkit-autofill {
  -webkit-text-fill-color: #1e1e1e !important;
}

.form-input:focus {
  outline: none;
  border: 1px solid #d5d5d5;
  background-color: #f3f3f3;
  color: #1e1e1e;
}

.form-select:focus {
  outline: none;
  border: 1px solid #d5d5d5;
  background-color: #f3f3f3;
  color: #1e1e1e;
}

.form-select option {
  background-color: #f3f3f3;
  color: #1e1e1e;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  padding: 8px;
}

.form-input:disabled {
  background-color: var(--color-gray-100);
  color: var(--color-gray-500);
  cursor: not-allowed;
}

.form-select {
  width: 100%;
  padding: 8px;
  padding-right: 32px;
  font-size: 12px; /* Increased to 12px to prevent zoom on iOS */
  border: none;
  border-radius: 0;
  font-weight: 400;
  font-family: 'Noto Sans JP', sans-serif;
  color: #939393;
  background-color: #f3f3f3;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M6.95 8.95L10 12L13.05 8.95L14.1 10L10 14.1L5.9 10L6.95 8.95Z" fill="%23939393"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  line-height: 1.5;
}

.form-select:not([value=""]):not(:invalid) {
  color: #1e1e1e;
}

/* Email input read-only styling */
input[name="email"][readonly] {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
  cursor: not-allowed;
}

input[name="email"][readonly]:focus {
  border-color: var(--color-gray-300);
  box-shadow: none;
}

/* Read-only text styling */
.form-readonly-text {
  width: 100%;
  font-size: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: #1e1e1e;
  background-color: transparent;
  min-height: 48px;
  box-sizing: border-box;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
}

/* Error States */
.form-group.error .form-input {
  border: 1px solid #ff0000;
  background-color: #f3f3f3;
  color: #ff0000;
}

.form-group.error .form-select {
  border: 1px solid #ff0000;
  background-color: #f3f3f3;
  color: #ff0000;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M6.95 8.95L10 12L13.05 8.95L14.1 10L10 14.1L5.9 10L6.95 8.95Z" fill="%23ff0000"/></svg>');
}

.error-message {
  font-size: 10px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: #ff0000;
  margin-top: 4px;
  line-height: 1.5;
  display: block;
}

.error-message:empty {
  display: none;
}

/* Birthday Selects */
.birthday-selects {
  display: flex;
  flex-direction: column;
  gap: var(--space-100);
  width: 100%;
}

.birthday-selects .form-select {
  width: 100%;
  max-width: 100%;
}

.birthday-selects-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.birthday-year,
.birthday-month,
.birthday-day {
  flex: 1;
  min-width: 80px;
}

.birthday-day {
  flex: 1;
  min-width: 80px;
}

/* Postal Search Section */
.postal-search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 8px 0;
  width: 100%;
  max-width: 100%;
}

.postal-lookup-link {
  font-size: 12px;
  color: #616161;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.postal-lookup-link:hover {
  color: var(--color-primary-600);
}

.postal-search-btn {
  background-color: var(--color-primary-500);
  color: white;
  border: none;
  padding: var(--space-100) var(--space-200);
  border-radius: var(--radius-100);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  min-height: 48px;
}

.postal-search-btn:hover:not(:disabled) {
  background-color: var(--color-primary-600);
}

#postal-search-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Postal Code Group */
.postal-code-group {
  display: flex;
  gap: var(--space-100);
  align-items: flex-start;
}

.postal-input {
  flex: 1;
}

#postal-search-btn {
  height: 48px;
  padding: 8px 16px;
  background-color: white;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  font-size: 12px;
  color: #616161;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

#postal-search-btn:enabled {
  background-color: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

#postal-search-btn:enabled:hover {
  background-color: var(--color-gray-900);
}

.postal-search-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.search-icon {
  font-size: var(--font-size-12);
}


/* Checkbox Styles */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 252px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 0;
  min-height: 40px;
  width: 100%;
  box-sizing: border-box;
}

/* Checkbox content container */
.checkbox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 252px;
}

.checkbox-label {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-150);
  color: var(--color-gray-900);
  white-space: nowrap;
}

.checkbox-caption {
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-10);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-150);
  color: var(--color-gray-600);
}

/* Legacy support for old checkbox structure */
.checkbox-item > span:not(.checkmark):not(.checkbox-content) {
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  display: flex;
  flex-direction: column;
  gap: 0;
}


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

.checkmark {
  width: 20px;
  height: 20px;
  border-width: 2px;
  border-style: solid;
  border-color: var(--color-gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
  background-color: var(--color-black);
  border-color: var(--color-black);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  color: var(--color-white);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Disable hover effects on checkbox items to prevent flickering */
.checkbox-item:hover,
.checkbox-item:hover .checkmark,
.checkbox-item:hover input[type="checkbox"] + .checkmark {
  background-color: inherit !important;
  border-color: inherit !important;
  transform: none !important;
  transition: none !important;
  box-shadow: none !important;
}

/* Ensure checked state is preserved on hover */
.checkbox-item:hover input[type="checkbox"]:checked + .checkmark {
  background-color: var(--color-black) !important;
  border-color: var(--color-black) !important;
}

.privacy-section {
  background-color: #f3f3f3;
  padding: 16px 12px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.consent-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.required-consent {
  /* Remove special styling to match other checkboxes */
  border-radius: var(--radius-sm);
}

/* Privacy Link */
.privacy-link {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
}

.privacy-link:hover {
  color: var(--color-gray-600);
}

/* Postal Search Container */
.postal-search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 12px;
}

.postal-search-row {
  margin: 16px 0;
}

.postal-search-horizontal {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  margin-left: 0dvb; /* Align with form inputs (120px label width + 12px gap) */
  flex-wrap: nowrap;
  width: calc(100%);
}

/* Material Symbols の基本指定 */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px; /* 必要に応じて調整 */
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  /* 可変フォントの軸を指定 */
  font-variation-settings:
    'FILL' 0,   /* 0:アウトライン、1:塗りあり */
    'wght' 300, /* 100..700 */
    'GRAD' 0,   /* -50..200 */
    'opsz' 20;  /* 20..48 推奨は表示サイズに合わせる */
}

.postal-lookup-link {
  display: flex;
  align-items: center;
  gap: 4px;
  writing-mode: horizontal-tb;
  direction: ltr;
  flex: 1;
  min-width: 160px;
}

.postal-lookup-link:hover {
  color: var(--color-gray-600);
}

.postal-lookup-text {
  color: inherit;
  writing-mode: horizontal-tb;
  direction: ltr;
}

.postal-lookup-icon {
  width: 16px;
  height: 16px;
  color: inherit;
}

/* Postal Code Search Button */
#postal-search-btn {
  background-color: var(--color-gray-200);
  color: var(--color-white);
  border: none;
  padding: 8px 16px;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font-family-japanese);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
  min-height: 48px;
  white-space: nowrap;
}

#postal-search-btn:not(:disabled) {
  background-color: var(--color-orange);
  color: var(--color-orange-900);
  font-weight: var(--font-weight-bold);
}

#postal-search-btn:not(:disabled):hover {
  background-color: rgba(255, 165, 0, 0.9);
}

#postal-search-btn:disabled {
  background-color: var(--color-gray-200);
  color: var(--color-white);
  cursor: not-allowed;
}

/* Buttons */
.submit-btn,
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 0;
  font-family: var(--font-family-japanese);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.submit-btn:not(:disabled),
.btn-primary {
  background-color: var(--color-orange);
  color: var(--color-orange-900);
  font-weight: var(--font-weight-bold);
}

.submit-btn:enabled:hover,
.btn-primary:hover {
  background-color: rgba(255, 165, 0, 0.9);
}

.submit-btn:disabled {
  background-color: var(--color-gray-200);
  color: var(--color-white);
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-gray-200);
}

.btn-secondary:hover {
  background-color: var(--color-gray-50);
}

/* Confirmation View */
.confirmation-content {
  padding: var(--space-300) 0;
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-200);
  margin-top: var(--space-600);
}

.confirmation-data {
  background-color: var(--color-gray-50);
  padding: var(--space-300);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-400);
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-150) 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.confirmation-item:last-child {
  border-bottom: none;
}

.confirmation-label {
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-600);
  min-width: 120px;
}

.confirmation-value {
  flex: 1;
  text-align: right;
  color: var(--color-gray-900);
}


/* Thanks View */
.thanks-content {
  text-align: center;
  padding: var(--space-600) 0;
}

.thanks-content h2 {
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-bottom: var(--space-300);
}

.thanks-content p {
  color: var(--color-gray-600);
  margin-bottom: var(--space-600);
}

.thanks-actions {
  display: flex;
  justify-content: center;
}

.thanks-actions .btn-primary {
  max-width: 200px;
}

/* Confirmation Page Styles */
.confirmation-content {
    padding: 0 0px 100px 0px; /* Bottom padding for fixed menu */
}

.confirmation-form-data {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.confirmation-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}


.confirmation-section-title {
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: bold;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.confirmation-section-value {
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.confirmation-section-values {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.confirmation-section-values .confirmation-value-item {
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.4;
}

/* Fixed Bottom Menu */
.confirmation-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    padding: 16px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.btn-secondary-outline {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid var(--color-gray-400);
    background: var(--color-white);
    color: var(--color-gray-900);
    font-family: var(--font-family-japanese);
    font-size: 14px;
    font-weight: 400;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary-outline:hover {
    background: var(--color-gray-50);
    border-color: var(--color-gray-600);
}

.btn-primary-confirm {
    flex: 1;
    width: 100%;
    padding: 16px 24px;
    border: none;
    background-color: var(--color-orange);
    color: var(--color-orange-900);
    font-family: var(--font-family-japanese);
    font-size: 16px;
    font-weight: 700;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-confirm:hover {
    background: linear-gradient(rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05)), var(--color-orange);
}

.btn-primary-confirm:disabled {
    background: var(--color-gray-200);
    cursor: not-allowed;
    transform: none;
}

/* Thanks Page Styles */
.thanks-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.thanks-icon {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

.thanks-text {
    margin-bottom: 40px;
}

.thanks-title {
    font-family: var(--font-family-japanese);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.thanks-message {
    margin-bottom: 32px;
    text-align: left;
}

.thanks-message p {
    font-family: var(--font-family-japanese);
    font-size: var(--font-size-14);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-150);
    color: var(--color-text);
    margin: 0;
}

.thanks-subtitle {
    font-family: var(--font-family-japanese);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.thanks-description {
    font-family: var(--font-family-japanese);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-gray-700);
    margin: 0;
    line-height: 1.6;
}

.thanks-actions {
    display: flex;
    justify-content: center;
}

.btn-close-liff {
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    border: none;
    background-color: var(--color-orange);
    color: var(--color-orange-900);
    font-family: var(--font-family-japanese);
    font-size: 16px;
    font-weight: 700;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-close-liff:hover {
    background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), var(--color-orange);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-close-liff:disabled {
    background: var(--color-gray-200);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
/* Small devices (375px and below) */
@media (max-width: 375px) {
  .container {
    padding: 0 16px;
    max-width: 100%;
  }
  
  .logo {
    width: 80px;
    height: auto;
  }
  
  .step-flow {
    gap: 8px;
  }
  
  .form-group {
    gap: 8px;
  }
  
  .confirmation-menu {
    padding: 12px;
    gap: 8px;
  }
  
  .form-body {
    max-width: 351px; /* 375 - 24px padding */
  }
  
  .logo-container {
    max-width: 351px;
    padding: 20px 8px;
  }
  
  .logo {
    width: 160px;
    height: 53px;
  }
  
  .step-flow {
    padding: 12px;
  }
  
  .postal-code-group {
    flex-direction: column;
  }
  
  .postal-search-btn {
    width: 100%;
  }
  
  .confirmation-actions {
    gap: var(--space-150);
  }
}

/* Standard mobile (376px to 390px) */
@media (min-width: 376px) and (max-width: 390px) {
  .container {
    padding: 0 16px;
    max-width: 390px;
  }
  
  .form-body {
    max-width: 358px; /* 390 - 32px padding */
  }
  
  .logo-container {
    max-width: 358px;
  }
}

/* Large mobile (391px to 430px) */
@media (min-width: 391px) and (max-width: 430px) {
  .container {
    padding: 0 20px;
    max-width: 430px;
  }
  
  .form-body {
    max-width: 390px; /* 430 - 40px padding */
  }
  
  .logo-container {
    max-width: 390px;
  }
  
  .confirmation-actions {
    flex-direction: row;
    gap: var(--space-200);
  }
  
  .confirmation-actions button {
    flex: 1;
  }
}

/* Extra large mobile (431px and above) */
@media (min-width: 431px) {
  .container {
    padding: 0 24px;
  }
  
  .form-body {
    max-width: 400px;
  }
  
  .logo-container {
    max-width: 400px;
  }
}

/* Loading States - Android対応強化 */
.loading {
  opacity: 0.6;
  pointer-events: none !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  cursor: not-allowed !important;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-gray-200);
  border-top: 2px solid var(--color-black);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
.form-input:focus-visible,
.form-select:focus-visible,
.checkbox-item:focus-within,
button:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* Email Form Group with 2-Row Layout (Figma Design) */
.email-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-100);
}

/* 1段目：Label + Input */
.email-row-1 {
  display: flex;
  gap: var(--space-150);
  align-items: start;
  width: 100%;
}

.email-row-1 .form-label-container {
  width: 120px;
  flex-shrink: 0;
}

.email-row-1 .form-input-container {
  flex: 1;
  min-width: 0;
}

.email-row-1 .form-input {
  width: 100%;
}

/* 2段目：Notice Message */
.email-row-2 {
  width: 100%;
}

.email-notice {
  display: flex;
  align-items: center;
  gap: var(--space-50);
  padding: var(--space-50) var(--space-100);
  background-color: #FCF7F7;
  border: 0.5px solid #872C29;
  border-radius: var(--radius-sm);
}

.notice-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-icon svg {
  width: 20px;
  height: 20px;
}

.notice-text {
  flex: 1;
  font-family: var(--font-family-japanese);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-150);
  color: #872C29;
  margin: 0;
}

/* Make form-input-container relative for positioning */
.form-input-container {
  position: relative;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-gray-200: #999999;
    --color-gray-400: #666666;
  }
}

/* Loading View Wrapper Styles */
#loading-view .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
}

/* Dedicated Spinner Indicator (Reusing @keyframes spin) */
.loading-indicator {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border: 4px solid var(--color-gray-200); /* ベースの灰色 */
    border-top: 4px solid var(--color-orange-900); /* ブランドカラーでくるくる */
    border-radius: 50%;
    animation: spin 1s linear infinite !important; /* !importantを追記して強制実行 */
}

/* Loading Message Text */
.loading-message {
    text-align: center;
    color: var(--color-gray-600);
    font-size: var(--font-size-14);
}