/* ========== AI TALK WORK / Female Registration Flow / Shared Styles ========== */

:root {
  --brand-bg: 252 248 250;
  /* very soft pink-white */
  --brand-surface: 255 255 255;
  --brand-ink: 31 25 30;
  /* near-black with warm tint */
  --brand-ink-soft: 71 64 70;
  --brand-muted: 122 110 118;
  --brand-line: 234 224 230;
  --brand-section: 255 245 248;
  /* form section bg */
  --brand-primary: 235 112 156;
  /* #EB709C */
  --brand-primary-soft: 255 230 240;
  --brand-primary-deep: 200 78 124;
  --brand-accent: 255 180 70;
  /* warm amber for sub action */
  --brand-success: 16 160 110;
  --brand-success-soft: 220 244 232;
  --brand-info: 60 130 220;
  --brand-info-soft: 224 238 252;
  --brand-danger: 220 60 80;
}

html,
body {
  background: rgb(var(--brand-bg));
  color: rgb(var(--brand-ink));
  overflow-x: hidden;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.01em;
}

.font-num {
  font-family: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  font-feature-settings: 'tnum';
}

/* ----- Layout shell ----- */
.shell {
  max-width: 480px;
  margin-inline: auto;
  padding-inline: 0;
}
@media (min-width: 640px) {
  .shell {
    padding-inline: 16px;
  }
}

/* ----- Header ----- */
.site-header {
  background: rgb(var(--brand-surface));
  border-bottom: 1px solid rgb(var(--brand-line) / 0.8);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(6px);
}

.site-header__inner {
  max-width: 480px;
  margin-inline: auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 16px;
}

.site-header__inner img {
  height: 22px;
  width: auto;
}

.site-header__badge {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: rgb(var(--brand-primary-deep));
  border: 1px solid rgb(var(--brand-primary) / 0.4);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(var(--brand-primary-soft) / 0.6);
}

/* ----- Page Title ----- */
.page-title {
  padding: 22px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title__dot {
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: rgb(var(--brand-primary));
}

.page-title h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgb(var(--brand-ink));
}

/* ----- Stepper ----- */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 6px 16px 18px;
  align-items: start;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.step__bar {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgb(var(--brand-line));
  z-index: 0;
}

.step:last-child .step__bar {
  display: none;
}

.step__bar--done {
  background: rgb(var(--brand-primary));
}

.step__num {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  background: rgb(var(--brand-surface));
  color: rgb(var(--brand-muted));
  border: 1.5px solid rgb(var(--brand-line));
}

.step__num--current {
  background: rgb(var(--brand-primary));
  color: #fff;
  border-color: rgb(var(--brand-primary));
  box-shadow: 0 0 0 4px rgb(var(--brand-primary) / 0.18);
}

.step__num--done {
  background: rgb(var(--brand-primary));
  color: #fff;
  border-color: rgb(var(--brand-primary));
}

.step__label {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgb(var(--brand-muted));
  text-align: center;
  line-height: 1.3;
}

.step__label--active {
  color: rgb(var(--brand-primary-deep));
  font-weight: 700;
}

/* ----- Card / Form section ----- */
.card {
  background: rgb(var(--brand-surface));
  border: 1px solid rgb(var(--brand-line) / 0.8);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 1px 2px rgba(40, 20, 30, 0.03), 0 8px 24px -16px rgba(40, 20, 30, 0.08);
}

.lead {
  color: rgb(var(--brand-ink-soft));
  font-size: 14px;
  line-height: 1.75;
}

/* ----- Field group ----- */
.field {
  margin-top: 18px;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgb(var(--brand-primary-soft) / 0.55);
  border-left: 3px solid rgb(var(--brand-primary));
  padding: 9px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: rgb(var(--brand-ink));
  margin-bottom: 10px;
}

.field__label .req {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(var(--brand-primary));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field__label .opt {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(var(--brand-line));
  color: rgb(var(--brand-muted));
  font-weight: 700;
}

.field__hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: rgb(var(--brand-muted));
}

/* ----- Inputs ----- */
.input,
.select,
.textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid rgb(var(--brand-line));
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  /* iOS no-zoom */
  font-family: inherit;
  color: rgb(var(--brand-ink));
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder {
  color: rgb(var(--brand-muted) / 0.7);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgb(var(--brand-primary));
  box-shadow: 0 0 0 4px rgb(var(--brand-primary) / 0.16);
}

.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23EB709C' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input--inline {
  display: inline-block;
  width: 7rem;
  max-width: 100%;
}

/* small label aside (姓/名 etc) */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row>.row__key {
  font-size: 13px;
  color: rgb(var(--brand-muted));
  flex: 0 0 28px;
}

.row>.input {
  flex: 1;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  transition: transform .1s, box-shadow .15s, background-color .15s, color .15s;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: rgb(var(--brand-primary));
  color: #fff;
  padding: 15px 24px;
  font-size: 16px;
  width: 100%;
  box-shadow: 0 6px 18px -8px rgb(var(--brand-primary) / 0.6);
}

.btn--primary:hover {
  background: rgb(var(--brand-primary-deep));
}

.btn--primary:disabled,
.btn--disabled {
  background: rgb(var(--brand-primary) / 0.45);
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  background: rgb(var(--brand-surface));
  color: rgb(var(--brand-ink));
  border: 1.5px solid rgb(var(--brand-line));
  padding: 11px 18px;
  font-size: 14px;
}

.btn--ghost:hover {
  border-color: rgb(var(--brand-primary));
  color: rgb(var(--brand-primary-deep));
}

.btn--amber {
  background: rgb(var(--brand-accent));
  color: #2a1b00;
  padding: 12px 22px;
  font-size: 14px;
}

.btn--small {
  padding: 10px 14px;
  font-size: 13px;
}

/* ----- Checkbox ----- */
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: rgb(var(--brand-section));
  border: 1px solid rgb(var(--brand-line));
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgb(var(--brand-ink));
  cursor: pointer;
}

.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgb(var(--brand-line));
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all .15s;
}

.check input[type="checkbox"]:checked {
  background: rgb(var(--brand-primary));
  border-color: rgb(var(--brand-primary));
}

.check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.check a {
  color: rgb(var(--brand-primary-deep));
  text-decoration: underline;
}

/* ----- File Upload ----- */
.file-slot {
  background: rgb(var(--brand-section));
  border: 1.5px dashed rgb(var(--brand-primary) / 0.45);
  border-radius: 12px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
}

.file-slot__icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgb(var(--brand-primary-soft));
  display: grid;
  place-items: center;
  color: rgb(var(--brand-primary));
}

.file-slot--circle .file-slot__icon {
  width: 110px;
  height: 110px;
}

.file-slot__hint {
  font-size: 12px;
  color: rgb(var(--brand-muted));
  text-align: center;
}

.file-picker {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid rgb(var(--brand-line));
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.file-picker__btn {
  padding: 11px 14px;
  background: rgb(var(--brand-section));
  color: rgb(var(--brand-ink));
  font-size: 13px;
  font-weight: 700;
  border-right: 1.5px solid rgb(var(--brand-line));
  cursor: pointer;
  flex-shrink: 0;
}

.file-picker__state {
  padding: 11px 14px;
  font-size: 13px;
  color: rgb(var(--brand-muted));
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----- ID samples (sample photos) ----- */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.sample-card {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5e6ec 0%, #e8d4dc 100%);
  display: grid;
  place-items: center;
  color: rgb(var(--brand-primary-deep));
  font-size: 10px;
  text-align: center;
  border: 1px solid rgb(var(--brand-line));
  position: relative;
  overflow: hidden;
}

.sample-card::before {
  content: '見本';
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgb(var(--brand-primary));
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ----- Style picker (style images) ----- */
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.style-card {
  aspect-ratio: 1 / 1.3;
  border-radius: 10px;
  background: linear-gradient(135deg, #fde7ee 0%, #fff 100%);
  border: 1.5px solid rgb(var(--brand-line));
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: rgb(var(--brand-primary-deep));
  font-size: 11px;
  font-weight: 700;
  transition: all .15s;
}

.style-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-card:has(input:checked) {
  border-color: rgb(var(--brand-primary));
  box-shadow: 0 0 0 3px rgb(var(--brand-primary) / 0.2);
}

.style-card__check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid rgb(var(--brand-line));
  display: grid;
  place-items: center;
}

.style-card:has(input:checked) .style-card__check {
  background: rgb(var(--brand-primary));
  border-color: rgb(var(--brand-primary));
  color: #fff;
}

.style-card:has(input:checked) .style-card__check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -3px;
}

/* ----- Info boxes ----- */
.note {
  background: rgb(var(--brand-info-soft));
  border-left: 3px solid rgb(var(--brand-info));
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgb(var(--brand-ink));
}

.note--success {
  background: rgb(var(--brand-success-soft));
  border-color: rgb(var(--brand-success));
}

.note--warn {
  background: #fff5e0;
  border-color: rgb(var(--brand-accent));
}

.bullet-list {
  padding-left: 6px;
}

.bullet-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgb(var(--brand-ink-soft));
}

.bullet-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgb(var(--brand-primary));
}

/* ----- My Clinic card ----- */
.clinic-card {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #f29ab7 0%, #eb709c 60%, #d4548a 100%);
  padding: 32px 16px;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 30px -12px rgb(var(--brand-primary) / 0.6);
}

.clinic-card__icon {
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.clinic-card__icon svg {
  color: #fff;
}

.clinic-card__title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: 'Inter', sans-serif;
}

.clinic-card__sub {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ----- Page footer ----- */
.site-footer {
  margin-top: 36px;
  padding: 22px 16px 32px;
  text-align: center;
  font-size: 11px;
  color: rgb(var(--brand-muted));
  border-top: 1px solid rgb(var(--brand-line));
  background: rgb(var(--brand-surface));
}

/* ----- Cta footer (sticky-ish container) ----- */
.cta-area {
  padding: 20px 16px 8px;
}

/* ----- Section divider ----- */
.divider {
  height: 1px;
  background: rgb(var(--brand-line));
  margin: 22px 0;
  border: 0;
}

/* ----- Tag (small "あなた" indicator etc) ----- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tag--pink {
  background: rgb(var(--brand-primary-soft));
  color: rgb(var(--brand-primary-deep));
}

.tag--success {
  background: rgb(var(--brand-success-soft));
  color: rgb(var(--brand-success));
}

/* ----- Loading spinner (for verification waiting) ----- */
.spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgb(var(--brand-primary) / 0.2);
  border-top-color: rgb(var(--brand-primary));
  border-radius: 999px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ----- Helper ----- */
.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* ----- Modal (利用規約・プライバシーポリシー用) ----- */
.q-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.q-modal.is-open {
  display: block;
}

.q-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 16, 0.55);
  backdrop-filter: blur(2px);
  animation: q-fade-in 0.15s ease-out;
}

.q-modal__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.q-modal__box {
  pointer-events: auto;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px -10px rgba(20, 10, 16, 0.4);
  animation: q-slide-up 0.2s ease-out;
}

.q-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid rgb(var(--brand-line));
  flex-shrink: 0;
}

.q-modal__title {
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: rgb(var(--brand-ink));
  letter-spacing: 0.02em;
}

.q-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgb(var(--brand-muted));
  border: none;
  background: rgb(var(--brand-section));
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.q-modal__close:hover {
  background: rgb(var(--brand-primary-soft));
  color: rgb(var(--brand-primary-deep));
}

.q-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: rgb(var(--brand-ink));
  line-height: 1.75;
  font-size: 14px;
  -webkit-overflow-scrolling: touch;
}

.q-modal__body h3 {
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: rgb(var(--brand-ink));
  border-left: 4px solid rgb(var(--brand-primary));
  padding-left: 10px;
  margin: 24px 0 12px;
}

.q-modal__body h3:first-child {
  margin-top: 0;
}

.q-modal__body h4 {
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: rgb(var(--brand-primary-deep));
  margin: 16px 0 8px;
}

.q-modal__body p {
  margin-bottom: 10px;
  color: rgb(var(--brand-ink-soft));
  font-size: 13.5px;
}

.q-modal__body ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 12px;
}

.q-modal__body ul li {
  font-size: 13px;
  color: rgb(var(--brand-ink-soft));
  margin-bottom: 4px;
}

.q-modal__body .q-modal__lead {
  background: rgb(var(--brand-primary-soft) / 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: rgb(var(--brand-ink));
  margin-bottom: 18px;
}

.q-modal__body .q-modal__contact {
  margin-top: 18px;
  background: rgb(var(--brand-section));
  border: 1px solid rgb(var(--brand-line));
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
}

.q-modal__body .q-modal__contact dt {
  color: rgb(var(--brand-muted));
  font-size: 11px;
  margin-bottom: 2px;
}

.q-modal__body .q-modal__contact dd {
  margin-bottom: 8px;
  color: rgb(var(--brand-ink));
}

.q-modal__body .q-modal__contact dd:last-child {
  margin-bottom: 0;
}

.q-modal__foot {
  padding: 14px 20px 18px;
  border-top: 1px solid rgb(var(--brand-line));
  flex-shrink: 0;
}

.q-modal__agree-btn {
  width: 100%;
  background: rgb(var(--brand-primary));
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
}

.q-modal__agree-btn:hover {
  background: rgb(var(--brand-primary-deep));
}

body.q-modal-open {
  overflow: hidden;
}

@keyframes q-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes q-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}