/* mktg.ax 会員SDKのスタイル
   トークンはダッシュボードと共通: 藍（主操作・量）/ 若竹（フォーカス）/ 煉瓦（エラー） */
:root {
  --mktg-ai: #274c77;
  --mktg-ai-deep: #1d3a5c;
  --mktg-wakatake: #2e8b74;
  --mktg-renga: #b85c38;
  --mktg-sumi: #1a2b3f;
  --mktg-haiao: #5b6b7d;
  --mktg-kasumi: #e3e9f0;
  --mktg-line: #c3cedb;
  --mktg-paper: #ffffff;
  --mktg-font: 'IBM Plex Sans JP', 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif;
}

/* 登録画面が開いている間の背景 */
html.mktg-auth-open {
  overflow: hidden;
}
.mktg-walled {
  filter: blur(4px) saturate(0.85);
  pointer-events: none;
  user-select: none;
}
@media (prefers-reduced-motion: no-preference) {
  .mktg-walled {
    transition: filter 0.2s ease-out;
  }
}

.mktg-auth {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(26, 43, 63, 0.28);
  overscroll-behavior: contain;
}

.mktg-auth__card {
  position: relative;
  box-sizing: border-box;
  width: min(400px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px 26px 22px;
  background: var(--mktg-paper);
  color: var(--mktg-sumi);
  border: 1px solid var(--mktg-line);
  border-radius: 12px;
  box-shadow: 0 20px 44px -24px rgba(26, 43, 63, 0.55);
  font-family: var(--mktg-font);
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
}
.mktg-auth__card *,
.mktg-auth__card *::before,
.mktg-auth__card *::after {
  box-sizing: border-box;
}
.mktg-auth__card.is-busy {
  cursor: progress;
  opacity: 0.7;
}
.mktg-auth__card.is-busy > * {
  pointer-events: none;
}

/* 式バーを踏襲した、お試し時間のメーター */
.mktg-auth__meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--mktg-kasumi);
  font-size: 12px;
  color: var(--mktg-haiao);
}
.mktg-auth__meter-track {
  height: 4px;
  background: var(--mktg-kasumi);
  border-radius: 2px;
  overflow: hidden;
}
.mktg-auth__meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--mktg-ai);
}
.mktg-auth__meter-value {
  font-variant-numeric: tabular-nums;
  color: var(--mktg-sumi);
}

.mktg-auth__title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.mktg-auth__lead {
  margin: 0 0 18px;
  color: var(--mktg-sumi);
}
.mktg-auth__note {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--mktg-haiao);
}

.mktg-auth__consents {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.mktg-auth__check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  cursor: pointer;
}
.mktg-auth__checkbox {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--mktg-ai);
}

.mktg-auth__providers {
  display: grid;
  gap: 8px;
}
.mktg-auth__btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--mktg-line);
  border-radius: 6px;
  background: var(--mktg-paper);
  color: var(--mktg-sumi);
  font: inherit;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}
.mktg-auth__btn:hover:not(:disabled) {
  background: #f2f5f9;
  border-color: var(--mktg-ai);
}
.mktg-auth__btn--primary {
  border-color: var(--mktg-ai);
  background: var(--mktg-ai);
  color: #fff;
}
.mktg-auth__btn--primary:hover:not(:disabled) {
  background: var(--mktg-ai-deep);
  border-color: var(--mktg-ai-deep);
}
.mktg-auth__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mktg-auth__email {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}
.mktg-auth__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--mktg-haiao);
}
.mktg-auth__or::before,
.mktg-auth__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mktg-kasumi);
}
.mktg-auth__label {
  font-size: 13px;
}
.mktg-auth__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--mktg-line);
  border-radius: 6px;
  background: var(--mktg-paper);
  color: var(--mktg-sumi);
  font: inherit;
}

.mktg-auth__actions {
  margin: 0 0 4px;
}
.mktg-auth__error {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--mktg-renga);
}
.mktg-auth__error[hidden] {
  display: none;
}
.mktg-auth__link {
  display: inline-block;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mktg-ai);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.mktg-auth__card a {
  color: var(--mktg-ai);
  text-underline-offset: 3px;
}
.mktg-auth__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--mktg-haiao);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.mktg-auth__close:hover {
  background: #f2f5f9;
}

.mktg-auth__card :focus-visible {
  outline: 2px solid var(--mktg-wakatake);
  outline-offset: 2px;
}

/* メールリンクの完了ページ（/auth/complete/） */
.mktg-complete-page {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #f2f5f9;
}
.mktg-complete-page [hidden] {
  display: none;
}

@media (max-width: 480px) {
  .mktg-auth {
    padding: 10px;
  }
  .mktg-auth__card {
    padding: 22px 18px 18px;
  }
}
