/* =============================================================
   ADVANCE 会員サイト 共通スタイル

   方針
     ・外部CDNを一切使わない（フォントも端末標準のものを使う）
       → 読み込みが速く、外部サービスの障害や規約変更の影響を受けない
     ・スマートフォンを基準に設計し、画面が広いときに広げる
   ============================================================= */

:root {
  /* 背景 */
  --bg:            #0c0c0d;
  --bg-elevated:   #161618;
  --bg-input:      #1e1e21;

  /* 文字 */
  --text:          #f4f2ee;
  --text-muted:    #9c9a95;
  --text-faint:    #6b6a66;

  /* ブランドカラー（ADVANCE のゴールド） */
  --gold:          #c9a961;
  --gold-bright:   #ddc086;
  --gold-dim:      rgba(201, 169, 97, 0.28);

  /* 状態 */
  --error:         #e57373;
  --success:       #7fc99a;

  --border:        rgba(255, 255, 255, 0.10);
  --radius:        10px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --font-serif: "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* -------------------------------------------------------------
   ログイン画面
   ------------------------------------------------------------- */

.auth-screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

/* --- ロゴ --- */

.brand {
  text-align: center;
  margin-bottom: 40px;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 11vw, 3.1rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  /* letter-spacing の分だけ右に寄るのを打ち消して中央に見せる */
  text-indent: 0.22em;
  color: var(--gold);
  margin: 0;
  line-height: 1.1;
}

.brand__rule {
  width: 128px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(
    to right,
    transparent,
    var(--gold-dim) 20%,
    var(--gold) 50%,
    var(--gold-dim) 80%,
    transparent
  );
}

.brand__tagline {
  margin: 16px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

/* --- フォーム --- */

.auth-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.auth-panel__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.auth-panel__lead {
  margin: 0 0 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.field__input {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  /* iOS で入力時に画面が拡大するのを防ぐため 16px 以上にする */
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input::placeholder { color: var(--text-faint); }

.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.field__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- ボタン --- */

.btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background: var(--gold);
  color: #1a1408;
}

.btn--primary:hover:not(:disabled) { background: var(--gold-bright); }

.btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 送信中に回るリング */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(26, 20, 8, 0.3);
  border-top-color: #1a1408;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  * { transition-duration: 0.01ms !important; }
}

/* --- メッセージ --- */

.message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.75;
}

.message[hidden] { display: none; }

.message--error {
  background: rgba(229, 115, 115, 0.10);
  border: 1px solid rgba(229, 115, 115, 0.35);
  color: var(--error);
}

.message--sent {
  background: rgba(127, 201, 154, 0.08);
  border: 1px solid rgba(127, 201, 154, 0.30);
  color: var(--text);
}

.message__title {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--success);
}

/* --- 補足・問い合わせ --- */

.auth-help {
  margin: 22px 0 0;
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--text-faint);
  text-align: center;
}

/*
   問い合わせ先の表記。
   現在は <span>（リンクなし）だが、LINEのURLが決まったら
   <a> に差し替えるだけでリンクとして成立するよう、
   両方のタグに効くスタイルを用意しておく。
*/
.auth-help__contact {
  color: var(--text-muted);
  font-weight: 600;
}

.auth-help a,
a.auth-help__contact {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-help a:hover,
a.auth-help__contact:hover { color: var(--gold); }

/* 画面には出さず、読み上げソフトにだけ伝える要素 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
