/* ==========================================================================
   TASFUL 会員登録ページ（signup.html 専用）
   既存CSSへの影響を避けるため signup- プレフィックスのみ使用
   ========================================================================== */

.signup-page {
  --signup-navy: #0c2340;
  --signup-navy-soft: #1e3a5f;
  --signup-navy-muted: #475569;
  --signup-gold: #c9a227;
  --signup-gold-dark: #a67c00;
  --signup-gold-light: #e6c65a;
  --signup-gold-gradient: linear-gradient(90deg, #e6b422 0%, #c39711 100%);
  --signup-page-bg: #f5f8ff;
  --signup-card-radius: 24px;
  --signup-input-radius: 12px;
  --signup-max: 1600px;
  --signup-pad-x: 64px;
  --signup-shadow: 0 18px 48px rgba(12, 35, 64, 0.1);
  --signup-shadow-sm: 0 8px 24px rgba(12, 35, 64, 0.06);
  --signup-header-h: 72px;

  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--signup-navy);
  background-color: #f5f8ff;
  overflow-x: hidden;
}

.signup-page *,
.signup-page *::before,
.signup-page *::after {
  box-sizing: border-box;
}

/* Header — 濃紺（#071733 統一） */
.signup-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #071733;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.signup-header__inner {
  width: min(calc(100% - var(--signup-pad-x) * 2), var(--signup-max));
  margin: 0 auto;
  min-height: 80px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.signup-header__logo {
  flex-shrink: 0;
}

.signup-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.signup-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s;
}

.signup-nav a:hover {
  color: #7dd3fc;
}

.signup-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.signup-header__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.signup-header__login:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.signup-header__login--current {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.signup-header__register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--signup-gold-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
}

.signup-header__register:hover {
  filter: brightness(1.05);
}

.signup-header__register--current {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(201, 162, 39, 0.35);
}

/* Main layout */
.signup-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  min-height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  overflow: hidden;
  background-color: #f5f8ff;
  background-image: url("images/signup-bg.png?v=6");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.signup-layout {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 42px 64px 0;
  min-height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 90px;
  align-items: start;
}

/* 左カラム — 見出し / 機能カード / キャラ（縦並び） */
.signup-left {
  position: relative;
  z-index: 1;
  min-height: auto;
  padding-top: 8px;
  overflow: visible;
  width: 100%;
  min-width: 0;
}

.signup-copy {
  position: relative;
  z-index: 2;
  margin-top: 24px;
}

.signup-feature-card {
  position: relative;
  z-index: 2;
  margin-top: 32px;
  width: 100%;
  padding: 26px 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(190, 205, 230, 0.7);
  box-shadow: 0 16px 40px rgba(15, 35, 70, 0.1);
}

.signup-character-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  min-height: 540px;
  margin-top: 12px;
  overflow: visible;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding-left: 20px;
}

.signup-character {
  display: block;
  width: 560px;
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: top left;
  background: transparent;
  transform: translateY(0);
}

.signup-left__eyebrow {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: var(--signup-navy-soft);
  letter-spacing: 0.04em;
}

.signup-left__title {
  margin: 0;
  font-size: 62px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--signup-navy);
}

.signup-left__lead {
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 1.9;
  font-weight: 500;
  color: var(--signup-navy-soft);
}

.signup-feature-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #071f45;
  margin: 0 0 16px;
}

.signup-feature-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.signup-feature-item {
  min-height: 150px;
  padding: 16px 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(190, 205, 230, 0.72);
  box-shadow: 0 8px 20px rgba(15, 35, 70, 0.06);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.signup-feature-item:hover {
  transform: translateY(-3px);
  border-color: rgba(60, 120, 220, 0.35);
  box-shadow: 0 12px 28px rgba(15, 35, 70, 0.12);
}

.signup-feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(180deg, #eef5ff 0%, #e4efff 100%);
  color: #082451;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.signup-feature-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.signup-feature-label {
  font-size: 14px;
  font-weight: 800;
  color: #071f45;
  line-height: 1.35;
  margin-bottom: 7px;
}

.signup-feature-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #40536c;
  margin: 0;
}

/* Form card (right) */
.signup-form-area {
  position: sticky;
  top: 96px;
  z-index: 4;
  width: 100%;
  max-width: 500px;
  padding-top: 0;
}

.signup-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-top: 0;
  padding: 34px 42px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px rgba(15, 35, 70, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.signup-card__head {
  margin-bottom: 24px;
}

.signup-card__title {
  margin: 0 0 12px;
  font-size: 42px;
  font-weight: 900;
  color: var(--signup-navy);
}

.signup-card__subtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--signup-navy-muted);
}

/* Member type tabs */
.signup-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: 14px;
  background: #eef2f7;
  border: 1px solid rgba(30, 58, 95, 0.08);
}

.signup-tabs__btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 11px;
  text-align: center;
  color: var(--signup-navy-soft);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.signup-tabs__btn.is-active {
  background: var(--signup-navy-soft);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.22);
}

.signup-tabs__main {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.signup-tabs__sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.82;
}

.signup-tabs__btn:not(.is-active) .signup-tabs__sub {
  color: var(--signup-navy-muted);
}

/* Form fields */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.signup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signup-field__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--signup-navy);
}

.signup-field__input {
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: var(--signup-input-radius);
  border: 1.5px solid #dbe3ec;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--signup-navy);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.signup-field__input::placeholder {
  color: #94a3b8;
}

.signup-field__input:focus {
  outline: none;
  border-color: rgba(30, 58, 95, 0.45);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.08);
}

.signup-field__input.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.signup-field__password {
  position: relative;
}

.signup-field__password .signup-field__input {
  padding-right: 48px;
}

.signup-field__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--signup-navy-muted);
  cursor: pointer;
}

.signup-field__toggle:hover {
  background: #f1f5f9;
  color: var(--signup-navy-soft);
}

.signup-field__toggle-icon {
  width: 20px;
  height: 20px;
}

.signup-field__hint {
  margin: 0;
  font-size: 12px;
  color: var(--signup-navy-muted);
}

.signup-field__error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
}

.signup-field__error--center {
  text-align: center;
}

/* Agreement */
.signup-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.signup-agree input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.signup-agree__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.signup-agree input:checked + .signup-agree__box {
  background: var(--signup-navy-soft);
  border-color: var(--signup-navy-soft);
}

.signup-agree input:checked + .signup-agree__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.signup-agree input:focus-visible + .signup-agree__box {
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

.signup-agree__text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--signup-navy-soft);
}

.signup-agree__link {
  color: var(--signup-navy-soft);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signup-agree__link:hover {
  color: var(--signup-gold-dark);
}

/* Submit */
.signup-submit {
  appearance: none;
  width: 100%;
  height: 60px;
  min-height: 60px;
  margin-top: 4px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #f5c93a 0%, #dca611 100%);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(220, 166, 17, 0.28);
  transition: transform 0.15s, box-shadow 0.2s;
}

.signup-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(220, 166, 17, 0.34);
}

.signup-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.signup-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Divider */
.signup-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0;
  color: var(--signup-navy-muted);
  font-size: 13px;
  font-weight: 600;
}

.signup-divider::before,
.signup-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Social */
.signup-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup-social__btn {
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  border: 1.5px solid #dbe3ec;
  background: #fff;
  color: var(--signup-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  overflow: hidden;
  box-sizing: border-box;
}

.signup-social__btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.signup-social__btn--line {
  color: #06c755;
  font-weight: 700;
}

.signup-social__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.signup-social__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.signup-social__img {
  display: block;
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.signup-social__img--line {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
}

.signup-card__footer {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--signup-navy-muted);
}

.signup-card__footer-link {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.signup-card__footer-link:hover {
  text-decoration: underline;
}

/* Toast */
.signup-toast {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: var(--signup-shadow-sm);
}

.signup-toast[data-tone="success"] {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.signup-toast[data-tone="error"] {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.signup-toast[data-tone="info"] {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Responsive */
@media (max-width: 900px) {
  .signup-page {
    overflow-y: auto;
    height: auto;
    max-width: 100vw;
  }

  .signup-main {
    max-height: none;
    overflow: hidden;
    max-width: 100%;
  }

  .signup-layout {
    grid-template-columns: 1fr;
    padding: 32px 20px 56px;
    gap: 32px;
    min-height: auto;
    max-height: none;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .signup-left,
  .signup-form-area {
    max-width: 100%;
    min-width: 0;
  }

  .signup-form-area {
    position: static;
    max-width: 100%;
  }

  .signup-card {
    max-width: 100%;
  }

  .signup-character-wrap {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .signup-character {
    display: none !important;
  }

  .signup-feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) {
  .signup-page {
    height: 100vh;
    overflow-y: hidden;
  }
}

@media (max-width: 1080px) and (min-width: 901px) {
  .signup-layout {
    padding: 40px 40px 0;
    gap: 56px;
    grid-template-columns: minmax(0, 1fr) 460px;
  }

  .signup-character-wrap {
    min-height: 460px;
    padding-left: 20px;
  }

  .signup-character {
    width: 480px;
  }
}

@media (max-width: 820px) {
  .signup-header__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo actions"
      "nav nav";
    row-gap: 12px;
  }

  .signup-header__logo {
    grid-area: logo;
  }

  .signup-nav {
    grid-area: nav;
    justify-content: flex-start;
    gap: 8px 16px;
    max-width: 100%;
    min-width: 0;
  }

  .signup-header__actions {
    grid-area: actions;
  }
}

@media (max-width: 560px) {
  .signup-header {
    overflow-x: hidden;
  }

  .signup-header__inner {
    width: min(calc(100% - 24px), var(--signup-max));
    gap: 10px 8px;
  }

  .signup-nav a {
    font-size: 11px;
    font-weight: 700;
  }

  .signup-nav {
    gap: 4px 8px;
  }

  .signup-header__login,
  .signup-header__register {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .signup-layout {
    padding: 28px 16px 48px;
    overflow-x: hidden;
  }

  .signup-left__title {
    font-size: clamp(1.875rem, 9.5vw, 2.625rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .signup-left__lead {
    font-size: 15px;
    line-height: 1.75;
  }

  .signup-feature-card {
    padding: 20px 16px;
    overflow: hidden;
  }

  .signup-card {
    padding: 28px 22px 24px;
  }
}

.login-last-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.login-last-user__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.45);
}

.login-last-user__body {
  min-width: 0;
}

.login-last-user__label {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.login-last-user__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.login-last-user__type {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}
