@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600&display=swap');

:root {
  --ma-text: #1d1d1f;
  --ma-text-secondary: #86868b;
  --ma-border: #d2d2d7;
  --ma-focus: #0071e3;
  --ma-error: #de3730;
  --ma-error-bg: #fff5f5;
  --ma-success: #248a3d;
  --ma-success-bg: #f0faf2;
  --ma-font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ma-font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  color: var(--ma-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ma-focus); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.member-auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
}

/* ===== Card ===== */
.member-auth-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid #d2d2d7;
  border-radius: 16px;
  padding: 48px 40px 36px;
  background: #fff;
}

/* ===== Logo ===== */
.member-auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.member-auth-logo img {
  max-width: 120px;
  height: auto;
}
.member-auth-logo span {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ma-text);
}

/* ===== Header ===== */
.member-auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.member-auth-eyebrow {
  display: none;
}
.member-auth-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ma-text);
  letter-spacing: -0.01em;
}
.member-auth-description {
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ma-text-secondary);
  line-height: 1.5;
}

/* ===== Form ===== */
.member-auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.member-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.member-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.member-auth-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ma-text);
}

/* ===== Inputs ===== */
.member-auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ma-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ma-text);
  font-family: var(--ma-font);
  font-size: 17px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.member-auth-input::placeholder {
  color: #c7c7cc;
}
.member-auth-input:focus {
  outline: none;
  border-color: var(--ma-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

/* Readonly */
.member-auth-readonly-wrap { position: relative; }
.member-auth-readonly-wrap::after {
  content: "";
  display: none;
}
.member-input-readonly {
  background: #f5f5f7;
  color: var(--ma-text-secondary);
  cursor: default;
}

/* ===== Checkbox ===== */
.member-auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ma-text);
  cursor: pointer;
}
.member-auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--ma-focus);
  cursor: pointer;
}

/* ===== Button ===== */
.member-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  background: var(--ma-text);
  color: #fff;
  font-family: var(--ma-font);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s;
}
.member-auth-btn:hover {
  opacity: 0.85;
  text-decoration: none;
}
.member-auth-btn:active {
  opacity: 0.7;
}
.member-auth-btn-link {
  margin-top: 8px;
  text-decoration: none;
}

/* ===== Links ===== */
.member-auth-link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ma-focus);
}

/* ===== Help ===== */
.member-auth-help {
  font-size: 0.78rem;
  color: var(--ma-text-secondary);
  margin-top: 4px;
}

/* ===== Messages ===== */
.member-auth-error,
.member-auth-success,
.member-auth-info {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 16px;
}
.member-auth-error {
  background: var(--ma-error-bg);
  color: var(--ma-error);
}
.member-auth-success {
  background: var(--ma-success-bg);
  color: var(--ma-success);
}
.member-auth-info {
  background: #f5f5f7;
  color: var(--ma-text);
}
.member-auth-error p,
.member-auth-success p,
.member-auth-info p {
  margin: 0;
}

/* ===== Footer ===== */
.member-auth-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ma-text-secondary);
}
.member-auth-footer p { margin: 0; }

/* ===== Divider ===== */
.member-auth-divider {
  height: 1px;
  background: var(--ma-border);
  margin: 20px 0;
}

/* ===== Utility ===== */
.is-hidden { display: none; }

/* ===== Mobile ===== */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .member-auth-page {
    padding: 0;
    align-items: flex-start;
  }
  .member-auth-card {
    max-width: 100%;
    padding: 48px 24px 32px;
  }
  .member-auth-title {
    font-size: 1.5rem;
  }
  .member-auth-input {
    height: 46px;
    font-size: 16px;
    border-radius: 10px;
  }
  .member-auth-btn {
    height: 48px;
    border-radius: 10px;
  }
  .member-auth-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
