/*
 * /infinity-flogin（初回ログインの入口）。背景は純白固定。グラデーション・画像・模様は使わない。
 */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --ink: #1a1a1a;
  --mark: #3c4043;
  --sub: #5f6368;
  --border: #dadce0;
  --border-strong: #bdc1c6;
  --pressed: #f1f3f4;
  --hover: #f8f9fa;
  --error: #b3261e;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", Meiryo, system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
}

body {
  font-family: var(--font-ja);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.flogin {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.mark {
  margin: 0;
  color: var(--mark);
  font-size: 26px;
  line-height: 1;
}

/* 字間は広めに。letter-spacing は末尾にも付くので、右へずれないよう padding-left で打ち消す。 */
.brand {
  margin: 28px 0 0;
  padding-left: 0.2em;
  font-family: var(--font-en);
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.3;
  color: var(--ink);
}

.lead {
  margin: 44px 0 0;
  font-size: clamp(19px, 5.4vw, 24px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.sub {
  margin: 12px 0 0;
  font-size: clamp(14px, 3.8vw, 16px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--sub);
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 48px;
}

.error {
  margin: 0 0 14px;
  max-width: 320px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}

.error[hidden] {
  display: none;
}

.google-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(300px, 100%);
  height: 50px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FFFFFF;
  color: #1f1f1f;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, border-color 120ms ease, transform 80ms ease;
}

@media (hover: hover) {
  .google-button:hover:not(:disabled) {
    background: var(--hover);
  }
}

/* 押した瞬間の手応え（通信とは無関係に出す）。 */
.google-button:active:not(:disabled),
.google-button.is-pressed {
  transform: translateY(1px) scale(0.99);
  background: var(--pressed);
  border-color: var(--border-strong);
}

.google-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* 接続中は押せないが、「押せなくなっただけ」に見せない（ローディングと文言を出す）。 */
.google-button:disabled {
  cursor: progress;
  opacity: 1;
  color: #3c4043;
  background: var(--hover);
  border-color: var(--border-strong);
}

.google-icon,
.spinner {
  flex: none;
  width: 18px;
  height: 18px;
}

.spinner {
  display: none;
  color: #3c4043;
}

.google-button[data-state='connecting'] .google-icon {
  display: none;
}

.google-button[data-state='connecting'] .spinner {
  display: block;
  animation: spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .google-button {
    transition: none;
  }

  .google-button[data-state='connecting'] .spinner {
    animation-duration: 2.4s;
  }
}

.policy {
  margin-top: 40px;
  font-size: 13px;
  color: var(--sub);
}

.policy-links {
  margin: 0;
}

/* Google アカウントをお持ちでない方への導線（/google）。規約リンクの上に 1 行 */
.no-account {
  margin: 0 0 14px;
  font-size: 13px;
}

.no-account a {
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.no-account a:hover,
.no-account a:focus-visible {
  color: var(--ink);
}

.policy-links a {
  color: var(--sub);
  text-decoration: none;
  text-underline-offset: 3px;
}

.policy-links a:hover,
.policy-links a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.sep {
  margin: 0 0.6em;
  color: var(--border-strong);
}

.policy-notice {
  min-height: 1.7em;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--sub);
}

.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;
}
