* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html {
  font-size: var(--ui-root-font);
}

body {
  background-color: #f4f6f8;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 1rem;
  font-size: var(--ui-fs-body);
  font-weight: 400;
}

.login-container {
  background: white;
  padding: 32px;
  width: 320px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: var(--ui-fs-body);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: var(--ui-fs-card-title);
  font-weight: var(--ui-fw-card-title);
}

.login-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: var(--ui-fs-body);
}

.login-container button {
  width: 100%;
  padding: 10px;
  background-color: #0066ff;
  border: none;
  color: white;
  font-size: var(--ui-fs-body);
  border-radius: 4px;
  cursor: pointer;
}

.login-container button:hover {
  background-color: #0052cc;
}

.login-container label,
.login-container p,
.login-otp-hint,
.login-back-link {
  font-size: var(--ui-fs-body);
}

.login-otp-setup-title {
  margin-bottom: 10px;
  font-size: var(--ui-fs-body);
  font-weight: 700;
  color: #856404;
}

#message {
  margin-top: 12px;
  text-align: center;
  font-size: var(--ui-fs-body);
  white-space: pre-line;
}

.login-sns-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.9rem;
  color: #9aa0a6;
  font-size: var(--ui-fs-body);
}

.login-sns-divider::before,
.login-sns-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e3e7;
}

.login-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 10px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #3c4043;
  text-decoration: none;
  font-size: var(--ui-fs-body);
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

.login-google-btn:hover {
  background: #f8f9fa;
  border-color: #c6c9ce;
  color: #202124;
  text-decoration: none;
}

.login-google-icon {
  flex-shrink: 0;
}

/* Phone: fill usable width and enlarge touch targets (keep body font size) */
@media (max-width: 767px) {
  body {
    align-items: flex-start;
    padding: 1.25rem;
    padding-top: max(2.5rem, 8vh);
  }

  .login-container {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    padding: 1.75rem 1.35rem 1.5rem;
    border-radius: 0.75rem;
  }

  .login-container h2 {
    margin-bottom: 1.5rem;
  }

  .login-container input {
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    min-height: 3.2rem;
    border-radius: 0.5rem;
  }

  .login-container button[type="submit"],
  .login-container #btnVerifyOtp,
  .login-container #btnCompleteSetup,
  .login-container #btnCancelSetup,
  .login-google-btn {
    padding: 0.95rem 1rem;
    min-height: 3.2rem;
    border-radius: 0.5rem;
  }

  #otpQrImg {
    width: min(200px, 70vw) !important;
    height: auto !important;
  }
}
